Skip to contentSkip to conversation

Add more comprehensive error message for invalid project name

PATCH Superseded Ioana Grigoropol 2 participants 4 messages Mar 14, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add more comprehensive error message for invalid project name

[Yocto #4008]

---
 .../sdk/ide/wizard/NewYoctoCProjectTemplate.java   |   34 +++++++++++++++++---
 1 file changed, 29 insertions(+), 5 deletions(-)
plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java +29 -5
index 5ffd6b7..8ab5972 100644
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.yocto.sdk.ide.wizard;
 
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.LinkedHashMap;
 import java.util.List;
 
@@ -46,11 +48,11 @@ import org.yocto.sdk.ide.YoctoProfileElement;
 import org.yocto.sdk.ide.YoctoSDKChecker;
 import org.yocto.sdk.ide.YoctoSDKChecker.SDKCheckRequestFrom;
 import org.yocto.sdk.ide.YoctoSDKChecker.SDKCheckResults;
+import org.yocto.sdk.ide.YoctoSDKPlugin;
+import org.yocto.sdk.ide.YoctoUIElement;
 import org.yocto.sdk.ide.natures.YoctoSDKEmptyProjectNature;
 import org.yocto.sdk.ide.natures.YoctoSDKProjectNature;
 import org.yocto.sdk.ide.utils.YoctoSDKUtils;
-import org.yocto.sdk.ide.YoctoSDKPlugin;
-import org.yocto.sdk.ide.YoctoUIElement;
 
 
 @SuppressWarnings("restriction")
@@ -58,11 +60,20 @@ public class NewYoctoCProjectTemplate extends ProcessRunner {
 	protected boolean savedAutoBuildingValue;
 	protected ProjectCreatedActions pca;
 	protected IManagedBuildInfo info;
+	protected List<Character> illegalChars = Arrays.asList('$', '"','#','%','&','\'','(',')','*', '+', ',','.','/',':',';','<','=','>','?','@','[','\\',']','^','`','{','|','}','~');
 	
 	public NewYoctoCProjectTemplate() {
 		pca = new ProjectCreatedActions();
 	}
-	
+	private String printIllegalChars(){
+		String print = "";
+		for (int i = 0; i < illegalChars.size(); i++) {
+			print += illegalChars.get(i);
+			if (i != illegalChars.size() - 1)
+				print += " ,";
+		}
+		return print;
+	}
 	public void process(TemplateCore template, ProcessArgument[] args, String processId, IProgressMonitor monitor) throws ProcessFailureException {
 
 		String projectName = args[0].getSimpleValue();
@@ -74,9 +85,10 @@ public class NewYoctoCProjectTemplate extends ProcessRunner {
 		boolean isEmptryProject = Boolean.valueOf(isEmptyProjetValue).booleanValue();
 		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
 		try {
-			if (projectName.contains(" ")) {
+			if (!isValidProjectName(projectName)) {
 				project.delete(true, null);
-				throw new ProcessFailureException(projectName + " contains space(s).  Project name can't contain space(s)");
+				throw new ProcessFailureException("Project name " + "\""+ projectName +"\"" +" is invalid! " +
+						"\nNone of these characters are accepted inside project names: whitespaces, " + printIllegalChars());
 			}
 			if (!project.exists()) {
 				IWorkspace workspace = ResourcesPlugin.getWorkspace();
@@ -166,6 +178,18 @@ public class NewYoctoCProjectTemplate extends ProcessRunner {
 			throw new OperationCanceledException(Messages.getString("NewManagedProject.3") + e.getMessage());
 		}
 	}
+	private boolean isValidProjectName(String projectName) {
+		if (projectName.contains("\\s+"))
+			return false;
+
+		char[] chars = projectName.toCharArray();
+		if (!Character.isJavaIdentifierStart(chars[0]))
+			return false;
+		for (int i = 1; i < chars.length; i++)
+			if (illegalChars.contains(chars[i]))
+				return false;
+		return true;
+}
 
 	protected final void turnOffAutoBuild(IWorkspace workspace) throws CoreException {
 		IWorkspaceDescription workspaceDesc = workspace.getDescription();
Signature · 1 line
1.7.9.5
#1 lore raw

Hi Ioana,

Ioana Grigoropol wrote, On 14.03.2013 10:06:

Quoted 43 lines

[Yocto #4008]

---
  .../sdk/ide/wizard/NewYoctoCProjectTemplate.java   |   34 +++++++++++++++++---
  1 file changed, 29 insertions(+), 5 deletions(-)
plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java +5 -2
index 5ffd6b7..8ab5972 100644
@@ -10,6 +10,8 @@
   *******************************************************************************/
  package org.yocto.sdk.ide.wizard;
 
+import java.util.ArrayList;
+import java.util.Arrays;
  import java.util.LinkedHashMap;
  import java.util.List;
 
@@ -46,11 +48,11 @@ import org.yocto.sdk.ide.YoctoProfileElement;
  import org.yocto.sdk.ide.YoctoSDKChecker;
  import org.yocto.sdk.ide.YoctoSDKChecker.SDKCheckRequestFrom;
  import org.yocto.sdk.ide.YoctoSDKChecker.SDKCheckResults;
+import org.yocto.sdk.ide.YoctoSDKPlugin;
+import org.yocto.sdk.ide.YoctoUIElement;
  import org.yocto.sdk.ide.natures.YoctoSDKEmptyProjectNature;
  import org.yocto.sdk.ide.natures.YoctoSDKProjectNature;
  import org.yocto.sdk.ide.utils.YoctoSDKUtils;
-import org.yocto.sdk.ide.YoctoSDKPlugin;
-import org.yocto.sdk.ide.YoctoUIElement;
 
 
  @SuppressWarnings("restriction")
@@ -58,11 +60,20 @@ public class NewYoctoCProjectTemplate extends ProcessRunner {
  	protected boolean savedAutoBuildingValue;
  	protected ProjectCreatedActions pca;
  	protected IManagedBuildInfo info;
+	protected List<Character> illegalChars = Arrays.asList('$', '"','#','%','&','\'','(',')','*', '+', ',','.','/',':',';','<','=','>','?','@','[','\\',']','^','`','{','|','}','~');
 
  	public NewYoctoCProjectTemplate() {
  		pca = new ProjectCreatedActions();
  	}

plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java public class NewYoctoCProjectTemplate extends ProcessRunner { · line 76

Quoted 10 lines
plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java +9 -1
-	
+	private String printIllegalChars(){
+		String print = "";
+		for (int i = 0; i < illegalChars.size(); i++) {
+			print += illegalChars.get(i);
+			if (i != illegalChars.size() - 1)
+				print += " ,";
+		}
+		return print;
+	}

I think the contained "if" isn't really necessary. You can remove the last ", " afterwards. Then you can also use a for each loop to append the characters.

private String printIllegalChars(){
	String print = "";

	for (Character character : illegalChars) {
		print += character + ", ";
	}
		
	if (!illegalChars.isEmpty()) {
		print = print.substring(0, print.lastIndexOf(",") - 1);
	}
		
	return print;
}

plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java public class NewYoctoCProjectTemplate extends ProcessRunner { · line 91

Quoted 13 lines
plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java +3 -2
  	public void process(TemplateCore template, ProcessArgument[] args, String processId, IProgressMonitor monitor) throws ProcessFailureException {
 
  		String projectName = args[0].getSimpleValue();
@@ -74,9 +85,10 @@ public class NewYoctoCProjectTemplate extends ProcessRunner {
  		boolean isEmptryProject = Boolean.valueOf(isEmptyProjetValue).booleanValue();
  		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
  		try {
-			if (projectName.contains(" ")) {
+			if (!isValidProjectName(projectName)) {
  				project.delete(true, null);
-				throw new ProcessFailureException(projectName + " contains space(s).  Project name can't contain space(s)");
+				throw new ProcessFailureException("Project name " + "\""+ projectName +"\"" +" is invalid! " +
+						"\nNone of these characters are accepted inside project names: whitespaces, " + printIllegalChars());

Would be nice if we can wrap this up with the YoctoSDKMessages to be able to internationalize the string later.

Quoted 9 lines
plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java +2 -0
  			}
  			if (!project.exists()) {
  				IWorkspace workspace = ResourcesPlugin.getWorkspace();
@@ -166,6 +178,18 @@ public class NewYoctoCProjectTemplate extends ProcessRunner {
  			throw new OperationCanceledException(Messages.getString("NewManagedProject.3") + e.getMessage());
  		}
  	}
+	private boolean isValidProjectName(String projectName) {
+		if (projectName.contains("\\s+"))

plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java public class NewYoctoCProjectTemplate extends ProcessRunner { · line 192

Quoted 10 lines
plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java +10 -0
+			return false;
+
+		char[] chars = projectName.toCharArray();
+		if (!Character.isJavaIdentifierStart(chars[0]))
+			return false;
+		for (int i = 1; i < chars.length; i++)
+			if (illegalChars.contains(chars[i]))
+				return false;
+		return true;
+}

I think it would be better to use functionality from java.util.regex to do the name checking. The Pattern could be compiled once as a static member and we could than use the matcher to check whether the project name is fine.

Something like this:

private static Pattern pattern = Pattern.compile(".*(\\$|\").*");

private boolean isValidProjectName(String projectName) {
Matcher matcher = pattern.matcher(projectName);

  if (matcher.matches()) {
    return false;
  }

return true;
}

plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java public class NewYoctoCProjectTemplate extends ProcessRunner {

Quoted 4 lines
plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java +0 -0
  	protected final void turnOffAutoBuild(IWorkspace workspace) throws CoreException {
  		IWorkspaceDescription workspaceDesc = workspace.getDescription();
 

Best regards,
Timo

#2 lore raw

Hi Ioana,

Timo Müller wrote, On 14.03.2013 11:29:

Quoted 157 lines

Hi Ioana,

Ioana Grigoropol wrote, On 14.03.2013 10:06:

Quoted 57 lines

[Yocto #4008]

---
  .../sdk/ide/wizard/NewYoctoCProjectTemplate.java   |   34
+++++++++++++++++---
  1 file changed, 29 insertions(+), 5 deletions(-)

diff --git a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java

index 5ffd6b7..8ab5972 100644
---
a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java

+++
b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java

plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java +2 -0
@@ -10,6 +10,8 @@
 
 *******************************************************************************/
 
  package org.yocto.sdk.ide.wizard;
 
+import java.util.ArrayList;
+import java.util.Arrays;
  import java.util.LinkedHashMap;

import java.util.List;

plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java +3 -2
@@ -46,11 +48,11 @@ import org.yocto.sdk.ide.YoctoProfileElement;
  import org.yocto.sdk.ide.YoctoSDKChecker;
  import org.yocto.sdk.ide.YoctoSDKChecker.SDKCheckRequestFrom;
  import org.yocto.sdk.ide.YoctoSDKChecker.SDKCheckResults;
+import org.yocto.sdk.ide.YoctoSDKPlugin;
+import org.yocto.sdk.ide.YoctoUIElement;
  import org.yocto.sdk.ide.natures.YoctoSDKEmptyProjectNature;
  import org.yocto.sdk.ide.natures.YoctoSDKProjectNature;
  import org.yocto.sdk.ide.utils.YoctoSDKUtils;
-import org.yocto.sdk.ide.YoctoSDKPlugin;
-import org.yocto.sdk.ide.YoctoUIElement;
 
 
  @SuppressWarnings("restriction")
@@ -58,11 +60,20 @@ public class NewYoctoCProjectTemplate extends
 ProcessRunner {
      protected boolean savedAutoBuildingValue;
      protected ProjectCreatedActions pca;
      protected IManagedBuildInfo info;
+    protected List<Character> illegalChars = Arrays.asList('$',
 '"','#','%','&','\'','(',')','*', '+',
 ',','.','/',':',';','<','=','>','?','@','[','\\',']','^','`','{','|','}','~');
 
 
      public NewYoctoCProjectTemplate() {
          pca = new ProjectCreatedActions();
      }

plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java public class NewYoctoCProjectTemplate extends · line 76

Quoted 10 lines
plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java +9 -1
-
+    private String printIllegalChars(){
+        String print = "";
+        for (int i = 0; i < illegalChars.size(); i++) {
+            print += illegalChars.get(i);
+            if (i != illegalChars.size() - 1)
+                print += " ,";
+        }
+        return print;
+    }

I think the contained "if" isn't really necessary. You can remove the last ", " afterwards. Then you can also use a for each loop to append the characters.

private String printIllegalChars(){
     String print = "";

     for (Character character : illegalChars) {
         print += character + ", ";
     }

     if (!illegalChars.isEmpty()) {
         print = print.substring(0, print.lastIndexOf(",") - 1);
     }

     return print;
}
Quoted 16 lines
      public void process(TemplateCore template, ProcessArgument[]

args, String processId, IProgressMonitor monitor) throws ProcessFailureException {

          String projectName = args[0].getSimpleValue();
(quoted diff) +1 -2
@@ -74,9 +85,10 @@ public class NewYoctoCProjectTemplate extends
 ProcessRunner {
          boolean isEmptryProject =
 Boolean.valueOf(isEmptyProjetValue).booleanValue();
          IProject project =
 ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
          try {
-            if (projectName.contains(" ")) {
+            if (!isValidProjectName(projectName)) {
                  project.delete(true, null);
-                throw new ProcessFailureException(projectName + "
Quoted 5 lines

contains space(s). Project name can't contain space(s)");
+ throw new ProcessFailureException("Project name " +
"\""+ projectName +"\"" +" is invalid! " +
+ "\nNone of these characters are accepted
inside project names: whitespaces, " + printIllegalChars());

Would be nice if we can wrap this up with the YoctoSDKMessages to be able to internationalize the string later.

Quoted 12 lines
              }
              if (!project.exists()) {
                  IWorkspace workspace = ResourcesPlugin.getWorkspace();
(quoted diff) +0 -0
@@ -166,6 +178,18 @@ public class NewYoctoCProjectTemplate extends
 ProcessRunner {
              throw new

OperationCanceledException(Messages.getString("NewManagedProject.3") +

e.getMessage());
          }
      }
plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java +2 -0
+    private boolean isValidProjectName(String projectName) {
+        if (projectName.contains("\\s+"))

plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java public class NewYoctoCProjectTemplate extends ProcessRunner { · line 192

Quoted 10 lines
plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java +10 -0
+            return false;
+
+        char[] chars = projectName.toCharArray();
+        if (!Character.isJavaIdentifierStart(chars[0]))
+            return false;
+        for (int i = 1; i < chars.length; i++)
+            if (illegalChars.contains(chars[i]))
+                return false;
+        return true;
+}

I think it would be better to use functionality from java.util.regex to do the name checking. The Pattern could be compiled once as a static member and we could than use the matcher to check whether the project name is fine.

Something like this:

private static Pattern pattern = Pattern.compile(".*(\\$|\").*");

private boolean isValidProjectName(String projectName) {
   Matcher matcher = pattern.matcher(projectName);

   if (matcher.matches()) {
     return false;
   }

   return true;
}
Quoted 1 line
Quoted 8 lines
Quoted 5 lines

protected final void turnOffAutoBuild(IWorkspace workspace)
throws CoreException {
IWorkspaceDescription workspaceDesc =
workspace.getDescription();

Best regards,
Timo

I forgot to mention. I found a way to create projects with invalid names.

# Create a new Yocto C Project
# Enter a wrong name eg. Test"
# Press next
# Press finish
# --> Error Message is shown, press ok
# Press back
# Change the name to an also invalid name eg. Test$ # Click finish

Best regards,
Timo

#3 lore raw
In reply to Timo Müller

Hi Timo,

Thank you for the comments. I have sent a new version of the patch to the list.

Ioana
________________________________________
From: Timo Müller [[email protected]]
Sent: Thursday, March 14, 2013 12:29 PM
To: Grigoropol, IoanaX
Cc: [email protected]
Subject: Re: [yocto] [PATCH] [eclipse-poky][master]Add more comprehensive error message for invalid project name

Hi Ioana,

Ioana Grigoropol wrote, On 14.03.2013 10:06:

Quoted 43 lines

[Yocto #4008]

---
  .../sdk/ide/wizard/NewYoctoCProjectTemplate.java   |   34 +++++++++++++++++---
  1 file changed, 29 insertions(+), 5 deletions(-)
plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java +5 -2
index 5ffd6b7..8ab5972 100644
@@ -10,6 +10,8 @@
   *******************************************************************************/
  package org.yocto.sdk.ide.wizard;
 
+import java.util.ArrayList;
+import java.util.Arrays;
  import java.util.LinkedHashMap;
  import java.util.List;
 
@@ -46,11 +48,11 @@ import org.yocto.sdk.ide.YoctoProfileElement;
  import org.yocto.sdk.ide.YoctoSDKChecker;
  import org.yocto.sdk.ide.YoctoSDKChecker.SDKCheckRequestFrom;
  import org.yocto.sdk.ide.YoctoSDKChecker.SDKCheckResults;
+import org.yocto.sdk.ide.YoctoSDKPlugin;
+import org.yocto.sdk.ide.YoctoUIElement;
  import org.yocto.sdk.ide.natures.YoctoSDKEmptyProjectNature;
  import org.yocto.sdk.ide.natures.YoctoSDKProjectNature;
  import org.yocto.sdk.ide.utils.YoctoSDKUtils;
-import org.yocto.sdk.ide.YoctoSDKPlugin;
-import org.yocto.sdk.ide.YoctoUIElement;
 
 
  @SuppressWarnings("restriction")
@@ -58,11 +60,20 @@ public class NewYoctoCProjectTemplate extends ProcessRunner {
      protected boolean savedAutoBuildingValue;
      protected ProjectCreatedActions pca;
      protected IManagedBuildInfo info;
+     protected List<Character> illegalChars = Arrays.asList('$', '"','#','%','&','\'','(',')','*', '+', ',','.','/',':',';','<','=','>','?','@','[','\\',']','^','`','{','|','}','~');
 
      public NewYoctoCProjectTemplate() {
              pca = new ProjectCreatedActions();
      }

plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java public class NewYoctoCProjectTemplate extends ProcessRunner { · line 76

Quoted 10 lines
plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java +9 -1
-
+     private String printIllegalChars(){
+             String print = "";
+             for (int i = 0; i < illegalChars.size(); i++) {
+                     print += illegalChars.get(i);
+                     if (i != illegalChars.size() - 1)
+                             print += " ,";
+             }
+             return print;
+     }

I think the contained "if" isn't really necessary. You can remove the last ", " afterwards. Then you can also use a for each loop to append the characters.

private String printIllegalChars(){
        String print = "";

        for (Character character : illegalChars) {
                print += character + ", ";
        }

        if (!illegalChars.isEmpty()) {
                print = print.substring(0, print.lastIndexOf(",") - 1);
        }

        return print;
}

plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java public class NewYoctoCProjectTemplate extends ProcessRunner { · line 91

Quoted 13 lines
plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java +3 -2
      public void process(TemplateCore template, ProcessArgument[] args, String processId, IProgressMonitor monitor) throws ProcessFailureException {
 
              String projectName = args[0].getSimpleValue();
@@ -74,9 +85,10 @@ public class NewYoctoCProjectTemplate extends ProcessRunner {
              boolean isEmptryProject = Boolean.valueOf(isEmptyProjetValue).booleanValue();
              IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
              try {
-                     if (projectName.contains(" ")) {
+                     if (!isValidProjectName(projectName)) {
                              project.delete(true, null);
-                             throw new ProcessFailureException(projectName + " contains space(s).  Project name can't contain space(s)");
+                             throw new ProcessFailureException("Project name " + "\""+ projectName +"\"" +" is invalid! " +
+                                             "\nNone of these characters are accepted inside project names: whitespaces, " + printIllegalChars());

Would be nice if we can wrap this up with the YoctoSDKMessages to be able to internationalize the string later.

Quoted 9 lines
plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java +2 -0
                      }
                      if (!project.exists()) {
                              IWorkspace workspace = ResourcesPlugin.getWorkspace();
@@ -166,6 +178,18 @@ public class NewYoctoCProjectTemplate extends ProcessRunner {
                      throw new OperationCanceledException(Messages.getString("NewManagedProject.3") + e.getMessage());
              }
      }
+     private boolean isValidProjectName(String projectName) {
+             if (projectName.contains("\\s+"))

plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java public class NewYoctoCProjectTemplate extends ProcessRunner { · line 192

Quoted 10 lines
plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java +10 -0
+                     return false;
+
+             char[] chars = projectName.toCharArray();
+             if (!Character.isJavaIdentifierStart(chars[0]))
+                     return false;
+             for (int i = 1; i < chars.length; i++)
+                     if (illegalChars.contains(chars[i]))
+                             return false;
+             return true;
+}

I think it would be better to use functionality from java.util.regex to do the name checking. The Pattern could be compiled once as a static member and we could than use the matcher to check whether the project name is fine.

Something like this:

private static Pattern pattern = Pattern.compile(".*(\\$|\").*");

private boolean isValidProjectName(String projectName) {
Matcher matcher = pattern.matcher(projectName);

   if (matcher.matches()) {
     return false;
   }

return true;
}

plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java public class NewYoctoCProjectTemplate extends ProcessRunner {

Quoted 4 lines
plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/wizard/NewYoctoCProjectTemplate.java +0 -0
      protected final void turnOffAutoBuild(IWorkspace workspace) throws CoreException {
              IWorkspaceDescription workspaceDesc = workspace.getDescription();
 

Best regards,
Timo