JBoss Tools SVN: r37953 - in trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test: validation and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-01-18 15:08:18 -0500 (Wed, 18 Jan 2012)
New Revision: 37953
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/ELVariableRefactoringTest.java
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java
Log:
https://issues.jboss.org/browse/JBIDE-10661 Incorrect validation of ELs with syntax errors
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/ELVariableRefactoringTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/ELVariableRefactoringTest.java 2012-01-18 19:56:05 UTC (rev 37952)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/ELVariableRefactoringTest.java 2012-01-18 20:08:18 UTC (rev 37953)
@@ -70,7 +70,7 @@
sourceFile = project.getProject().getFile("/WebContent/pages/syntaxErrors.xhtml");
sourceFileContent = FileUtil.getContentFromEditorOrFile(sourceFile);
- position = sourceFileContent.indexOf("user.name");
+ position = sourceFileContent.indexOf("user");
structure = new TestChangeStructure(project, "/WebContent/pages/syntaxErrors.xhtml");
change = new TestTextChange(position, NAME_LEN, NEW_NAME);
structure.addTextChange(change);
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java 2012-01-18 19:56:05 UTC (rev 37952)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java 2012-01-18 20:08:18 UTC (rev 37953)
@@ -18,6 +18,7 @@
import org.eclipse.wst.validation.internal.operations.WorkbenchReporter;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.jboss.tools.common.base.test.validation.TestUtil;
+import org.jboss.tools.common.el.core.ElCoreMessages;
import org.jboss.tools.common.preferences.SeverityPreferences;
import org.jboss.tools.common.validation.ContextValidationHelper;
import org.jboss.tools.common.validation.IProjectValidationContext;
@@ -257,9 +258,10 @@
TestUtil.validate(file);
- AbstractResourceMarkerTest.assertMarkerIsCreated(file, ELValidationMessages.EL_SYNTAX_ERROR, true, 7, 8);
+ String messagePattern = MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_NAME, new Object[]{ElCoreMessages.ExpressionRule_ExpectingJavaName});
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, messagePattern, false, 7, 8);
- String messagePattern = MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_NAME, new Object[]{"abc."});
+ messagePattern = MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_NAME, new Object[]{"abc."});
AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, messagePattern, 7);
messagePattern = MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME, new Object[]{"broken"});
12 years, 12 months
JBoss Tools SVN: r37952 - in trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test: validation and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-01-18 14:56:05 -0500 (Wed, 18 Jan 2012)
New Revision: 37952
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/ELVariableRefactoringTest.java
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java
Log:
https://issues.jboss.org/browse/JBIDE-10661 Incorrect validation of ELs with syntax errors
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/ELVariableRefactoringTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/ELVariableRefactoringTest.java 2012-01-18 19:44:21 UTC (rev 37951)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/ELVariableRefactoringTest.java 2012-01-18 19:56:05 UTC (rev 37952)
@@ -67,11 +67,18 @@
change = new TestTextChange(601, NAME_LEN, NEW_NAME);
structure.addTextChange(change);
list.add(structure);
-
+
+ sourceFile = project.getProject().getFile("/WebContent/pages/syntaxErrors.xhtml");
+ sourceFileContent = FileUtil.getContentFromEditorOrFile(sourceFile);
+ position = sourceFileContent.indexOf("user.name");
+ structure = new TestChangeStructure(project, "/WebContent/pages/syntaxErrors.xhtml");
+ change = new TestTextChange(position, NAME_LEN, NEW_NAME);
+ structure.addTextChange(change);
+ list.add(structure);
+
RenameELVariableProcessor processor = new RenameELVariableProcessor(sourceFile, "user");
processor.setNewName(NEW_NAME);
checkRename(processor, list);
}
-
-}
+}
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java 2012-01-18 19:44:21 UTC (rev 37951)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java 2012-01-18 19:56:05 UTC (rev 37952)
@@ -253,7 +253,7 @@
* @throws ValidationException
*/
public void testSyntaxErrors() throws CoreException, ValidationException {
- IFile file = project.getFile("WebContent/pages/syntaxErrors.jsp");
+ IFile file = project.getFile("WebContent/pages/syntaxErrors.xhtml");
TestUtil.validate(file);
12 years, 12 months
JBoss Tools SVN: r37951 - in trunk/jsf/tests/org.jboss.tools.jsf.test: projects/JSFKickStartOldFormat/WebContent/pages and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-01-18 14:44:21 -0500 (Wed, 18 Jan 2012)
New Revision: 37951
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/syntaxErrors.xhtml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/JavaSource/demo/BaseBean.java
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java
Log:
https://issues.jboss.org/browse/JBIDE-10661 Incorrect validation of ELs with syntax errors
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/JavaSource/demo/BaseBean.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/JavaSource/demo/BaseBean.java 2012-01-18 19:34:29 UTC (rev 37950)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/JavaSource/demo/BaseBean.java 2012-01-18 19:44:21 UTC (rev 37951)
@@ -6,6 +6,6 @@
return "";
}
- public void fuck() {}
+ public void foo() {}
}
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/syntaxErrors.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/syntaxErrors.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/syntaxErrors.xhtml 2012-01-18 19:44:21 UTC (rev 37951)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html">
+#{abc.}
+ <h:outputText value="#{user.broken.}"/>
+
+</ui:composition>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java 2012-01-18 19:34:29 UTC (rev 37950)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java 2012-01-18 19:44:21 UTC (rev 37951)
@@ -17,6 +17,7 @@
import org.eclipse.wst.validation.internal.core.ValidationException;
import org.eclipse.wst.validation.internal.operations.WorkbenchReporter;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.jboss.tools.common.base.test.validation.TestUtil;
import org.jboss.tools.common.preferences.SeverityPreferences;
import org.jboss.tools.common.validation.ContextValidationHelper;
import org.jboss.tools.common.validation.IProjectValidationContext;
@@ -24,7 +25,6 @@
import org.jboss.tools.common.validation.ValidationErrorManager;
import org.jboss.tools.common.validation.ValidatorManager;
import org.jboss.tools.common.validation.internal.SimpleValidatingProjectTree;
-import org.jboss.tools.jsf.JSFModelPlugin;
import org.jboss.tools.jst.web.kb.WebKbPlugin;
import org.jboss.tools.jst.web.kb.internal.validation.ELValidationMessages;
import org.jboss.tools.jst.web.kb.internal.validation.ELValidator;
@@ -247,6 +247,25 @@
}
}
+ /**
+ * See https://jira.jboss.org/browse/JBIDE-10661
+ * @throws CoreException
+ * @throws ValidationException
+ */
+ public void testSyntaxErrors() throws CoreException, ValidationException {
+ IFile file = project.getFile("WebContent/pages/syntaxErrors.jsp");
+
+ TestUtil.validate(file);
+
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, ELValidationMessages.EL_SYNTAX_ERROR, true, 7, 8);
+
+ String messagePattern = MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_NAME, new Object[]{"abc."});
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, messagePattern, 7);
+
+ messagePattern = MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME, new Object[]{"broken"});
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, messagePattern, false, 8);
+ }
+
private long validateFile(String fileName, int numberOfMarkers) throws ValidationException {
Set<String> files = new HashSet<String>();
files.add(fileName);
12 years, 12 months
JBoss Tools SVN: r37950 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-01-18 14:34:29 -0500 (Wed, 18 Jan 2012)
New Revision: 37950
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/AbstractImportApplicationOperation.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureGitSharedProject.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureUnsharedProject.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/OpenShiftMavenProfile.java
Log:
[JBIDE-10479] now adding and committing modified/created files to local git repo
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/AbstractImportApplicationOperation.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/AbstractImportApplicationOperation.java 2012-01-18 19:02:35 UTC (rev 37949)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/AbstractImportApplicationOperation.java 2012-01-18 19:34:29 UTC (rev 37950)
@@ -65,8 +65,8 @@
* @see AbstractImportApplicationOperation#getApplication()
* @see #getRepositoryPath()
*/
- protected File cloneRepository(IApplication application, String remoteName, File destination,
- boolean addToRepoView, IProgressMonitor monitor)
+ protected File cloneRepository(IApplication application, String remoteName, File destination, boolean addToRepoView,
+ IProgressMonitor monitor)
throws OpenShiftException, InvocationTargetException, InterruptedException, URISyntaxException {
monitor.subTask(NLS.bind("Cloning repository for application {0}...", application.getName()));
EGitUIUtils.ensureEgitUIIsStarted();
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureGitSharedProject.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureGitSharedProject.java 2012-01-18 19:02:35 UTC (rev 37949)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureGitSharedProject.java 2012-01-18 19:34:29 UTC (rev 37950)
@@ -14,13 +14,18 @@
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
import java.util.List;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egit.core.op.AddToIndexOperation;
import org.eclipse.osgi.util.NLS;
import org.jboss.ide.eclipse.as.core.util.FileUtil;
import org.jboss.tools.openshift.egit.core.EGitUtils;
@@ -40,17 +45,21 @@
*/
public class ConfigureGitSharedProject extends AbstractImportApplicationOperation {
+ private ArrayList<IResource> modifiedResources;
+
public ConfigureGitSharedProject(String projectName, IApplication application, String remoteName,
IUser user) {
super(projectName, application, remoteName);
+ this.modifiedResources = new ArrayList<IResource>();
}
/**
* Enables the user chosen project to be used on the chosen OpenShift
- * application.
+ * application.
* <ul>
* <li>clones the application git repository</li>
- * <li>copies the configuration files to the user project (in the workspace)</li>
+ * <li>copies the configuration files to the user project (in the workspace)
+ * </li>
* <li>adds the appication git repo as remote</li>
* </ul>
*
@@ -86,24 +95,26 @@
IProject project = getProject();
Assert.isTrue(EGitUtils.isSharedWithGit(project));
- File tmpFolder = FileUtils.getRandomTmpFolder();
- File repositoryFile = cloneRepository(getApplication(), getRemoteName(), tmpFolder, false, monitor);
+ copyOpenshiftConfigurations(getApplication(), getRemoteName(), project, monitor);
- copyOpenshiftConfigurations(repositoryFile, project, monitor);
- FileUtil.safeDelete(tmpFolder);
-
setupGitIgnore(project);
+ project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
EGitUtils.addRemoteTo(
getRemoteName(),
getApplication().getGitUri(),
EGitUtils.getRepository(project));
-
setupOpenShiftMavenProfile(project);
+ addAndCommitModifiedResource(project, monitor);
return Collections.singletonList(project);
}
+ private void addAndCommitModifiedResource(IProject project, IProgressMonitor monitor) throws CoreException {
+ new AddToIndexOperation(modifiedResources).execute(monitor);
+ EGitUtils.commit(project, monitor);
+ }
+
private void setupOpenShiftMavenProfile(IProject project) throws CoreException {
Assert.isLegal(OpenShiftMavenProfile.isMavenProject(project));
@@ -112,7 +123,8 @@
return;
}
profile.addToPom(project.getName());
- profile.savePom();
+ IFile pomFile = profile.savePom();
+ modifiedResources.add(pomFile);
}
/**
@@ -131,18 +143,51 @@
* the project to copy the configuration to.
* @param monitor
* the monitor to report progress to
+ * @return
* @throws IOException
+ * @throws CoreException
+ * @throws URISyntaxException
+ * @throws InterruptedException
+ * @throws InvocationTargetException
+ * @throws OpenShiftException
*/
- private void copyOpenshiftConfigurations(final File sourceFolder, IProject project, IProgressMonitor monitor)
- throws IOException {
+ private void copyOpenshiftConfigurations(IApplication application, String remoteName, IProject project, IProgressMonitor monitor)
+ throws IOException, CoreException, OpenShiftException, InvocationTargetException, InterruptedException, URISyntaxException {
Assert.isLegal(project != null);
- File projectFolder = project.getLocation().toFile();
monitor.subTask(NLS.bind("Copying openshift configuration to project {0}...", project.getName()));
- FileUtils.copy(new File(sourceFolder, ".openshift"), projectFolder, false);
- FileUtils.copy(new File(sourceFolder, "deployments"), projectFolder, false);
+ File tmpFolder = FileUtils.getRandomTmpFolder();
+ cloneRepository(application, remoteName, tmpFolder, false, monitor);
+
+ Collection<IResource> copiedResources =
+ copyResources(tmpFolder, new String[] { ".openshift", "deployments" }, project);
+ modifiedResources.addAll(copiedResources);
+ FileUtil.safeDelete(tmpFolder);
}
+ private Collection<IResource> copyResources(File sourceFolder, String[] sourcePaths, IProject project)
+ throws IOException {
+ List<IResource> resources = new ArrayList<IResource>();
+ File projectFolder = project.getLocation().toFile();
+
+ for (String sourcePath : sourcePaths) {
+ File source = new File(sourceFolder, sourcePath);
+
+ if (!FileUtils.canRead(source)) {
+ continue;
+ }
+
+ FileUtils.copy(source, projectFolder, false);
+
+ if (source.isDirectory()) {
+ resources.add(project.getFolder(sourcePath));
+ } else {
+ resources.add(project.getFile(sourcePath));
+ }
+ }
+ return resources;
+ }
+
/**
* Adds a predefined set of entries to the gitignore file in (root of) the
* given project. If no .gitignore exists yet, a fresh one is created.
@@ -158,6 +203,8 @@
.add(".project")
.add(".classpath")
.add(".factorypath");
- gitIgnore.write(false);
+ File file = gitIgnore.write(false);
+ IFile gitIgnoreFile = project.getFile(file.getName());
+ modifiedResources.add(gitIgnoreFile);
}
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureUnsharedProject.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureUnsharedProject.java 2012-01-18 19:02:35 UTC (rev 37949)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureUnsharedProject.java 2012-01-18 19:34:29 UTC (rev 37950)
@@ -89,17 +89,12 @@
// model.shareProject(monitor);
// model.mergeWithApplicationRepository(repository,
// monitor);
- File tmpFolder = FileUtils.getRandomTmpFolder();
IProject project = getProject();
- File repositoryFile = cloneRepository(getApplication(), getRemoteName(), tmpFolder, false, monitor);
-
- copyOpenshiftConfigurations(repositoryFile, project, monitor);
- FileUtil.safeDelete(tmpFolder);
-
+ copyOpenshiftConfigurations(getApplication(), getRemoteName(), project, monitor);
createGitIgnore(project);
+ shareProject(project, monitor);
- shareProject(project, monitor);
return Collections.singletonList(project);
}
@@ -126,16 +121,27 @@
* @param monitor
* the monitor to report progress to
* @throws IOException
+ * @throws URISyntaxException
+ * @throws InterruptedException
+ * @throws InvocationTargetException
+ * @throws OpenShiftException
*/
- private void copyOpenshiftConfigurations(final File sourceFolder, IProject project, IProgressMonitor monitor)
- throws IOException {
+ private void copyOpenshiftConfigurations(IApplication application, String remoteName, IProject project, IProgressMonitor monitor)
+ throws IOException, OpenShiftException, InvocationTargetException, InterruptedException, URISyntaxException {
Assert.isLegal(project != null);
File projectFolder = project.getLocation().toFile();
+
+ File tmpFolder = FileUtils.getRandomTmpFolder();
+ cloneRepository(getApplication(), getRemoteName(), tmpFolder, false, monitor);
+
monitor.subTask(NLS.bind("Copying openshift configuration to project {0}...", project.getName()));
- FileUtils.copy(new File(sourceFolder, ".git"), projectFolder, false);
- FileUtils.copy(new File(sourceFolder, ".openshift"), projectFolder, false);
- FileUtils.copy(new File(sourceFolder, "deployments"), projectFolder, false);
- FileUtils.copy(new File(sourceFolder, "pom.xml"), projectFolder, false);
+ FileUtils.copy(new File(tmpFolder, ".git"), projectFolder, false);
+ FileUtils.copy(new File(tmpFolder, ".openshift"), projectFolder, false);
+ FileUtils.copy(new File(tmpFolder, "deployments"), projectFolder, false);
+ FileUtils.copy(new File(tmpFolder, "pom.xml"), projectFolder, false);
+
+ FileUtil.safeDelete(tmpFolder);
+
}
/**
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/OpenShiftMavenProfile.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/OpenShiftMavenProfile.java 2012-01-18 19:02:35 UTC (rev 37949)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/OpenShiftMavenProfile.java 2012-01-18 19:34:29 UTC (rev 37950)
@@ -272,12 +272,13 @@
return new Status(IStatus.ERROR, pluginId, message);
}
- public void savePom() throws CoreException {
+ public IFile savePom() throws CoreException {
Writer writer = null;
try {
writer = new StringWriter();
createTransformer().transform(new DOMSource(getDocument()), new StreamResult(writer));
pomFile.setContents(new ByteArrayInputStream(writer.toString().getBytes()), IResource.FORCE, null);
+ return pomFile;
} catch (TransformerConfigurationException e) {
throw new CoreException(createStatus(e));
} catch (TransformerException e) {
12 years, 12 months
JBoss Tools SVN: r37949 - trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-01-18 14:02:35 -0500 (Wed, 18 Jan 2012)
New Revision: 37949
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java
Log:
added erroneously removed overload for #clone
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java 2012-01-18 19:01:43 UTC (rev 37948)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java 2012-01-18 19:02:35 UTC (rev 37949)
@@ -218,7 +218,7 @@
public static void cloneRepository(String uri, String remoteName, File destination, IProgressMonitor monitor)
throws URISyntaxException, InvocationTargetException, InterruptedException {
-
+ cloneRepository(uri, remoteName, destination, null, monitor);
}
public static void cloneRepository(String uri, String remoteName, File destination, PostCloneTask postCloneTask,
12 years, 12 months
JBoss Tools SVN: r37948 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-01-18 14:01:43 -0500 (Wed, 18 Jan 2012)
New Revision: 37948
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidator.java
Log:
https://issues.jboss.org/browse/JBIDE-10661 Incorrect validation of ELs with syntax errors
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidator.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidator.java 2012-01-18 17:53:04 UTC (rev 37947)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidator.java 2012-01-18 19:01:43 UTC (rev 37948)
@@ -32,7 +32,6 @@
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
-import org.eclipse.jdt.core.JavaCore;
import org.eclipse.wst.validation.internal.core.ValidationException;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
import org.jboss.tools.common.CommonPlugin;
@@ -299,121 +298,119 @@
int offsetOfVarName = documnetOffset + operandToken.getFirstToken().getStart();
int lengthOfVarName = varName.length();
boolean unresolvedTokenIsVariable = false;
- if (!operand.endsWith(".")) { //$NON-NLS-1$
- ELResolution resolution = null;
- ELContext context = PageContextFactory.createPageContext(file);
- if(context==null) {
- context = new SimpleELContext();
- context.setResource(file);
- context.setElResolvers(resolvers);
+ ELResolution resolution = null;
+ ELContext context = PageContextFactory.createPageContext(file);
+ if(context==null) {
+ context = new SimpleELContext();
+ context.setResource(file);
+ context.setElResolvers(resolvers);
+ }
+ int maxNumberOfResolvedSegments = -1;
+ List<Var> vars = null;
+ ELContextImpl c = null;
+ if(!validateVars && context instanceof ELContextImpl) {
+ c = (ELContextImpl)context;
+ vars = c.getAllVars();
+ c.setAllVars(new ArrayList<Var>());
+ }
+
+ for (int i = 0; i < resolvers.length; i++) {
+ ELResolution elResolution = resolvers[i].resolve(context, operandToken, documnetOffset);
+ if(elResolution==null) {
+ continue;
}
- int maxNumberOfResolvedSegments = -1;
- List<Var> vars = null;
- ELContextImpl c = null;
- if(!validateVars && context instanceof ELContextImpl) {
- c = (ELContextImpl)context;
- vars = c.getAllVars();
- c.setAllVars(new ArrayList<Var>());
+ if(elResolution.isResolved()) {
+ resolution = elResolution;
+ break;
}
-
- for (int i = 0; i < resolvers.length; i++) {
- ELResolution elResolution = resolvers[i].resolve(context, operandToken, documnetOffset);
- if(elResolution==null) {
- continue;
- }
- if(elResolution.isResolved()) {
- resolution = elResolution;
- break;
- }
- int number = elResolution.getNumberOfResolvedSegments();
- if(number>maxNumberOfResolvedSegments) {
- maxNumberOfResolvedSegments = number;
- resolution = elResolution;
- }
+ int number = elResolution.getNumberOfResolvedSegments();
+ if(number>maxNumberOfResolvedSegments) {
+ maxNumberOfResolvedSegments = number;
+ resolution = elResolution;
}
+ }
- if(c!=null) {
- c.setAllVars(vars);
- }
+ if(c!=null) {
+ c.setAllVars(vars);
+ }
- if(resolution==null) {
- return;
+ if(resolution==null) {
+ return;
+ }
+ if(!resolution.isResolved()) {
+ Set<String> names = findVariableNames(operandToken);
+ for (String name : names) {
+ validationContext.addLinkedEl(name, elReference);
}
- if(!resolution.isResolved()) {
- Set<String> names = findVariableNames(operandToken);
- for (String name : names) {
- validationContext.addLinkedEl(name, elReference);
- }
- }
+ }
- List<ELSegment> segments = resolution.getSegments();
- List<IVariable> usedVariables = new ArrayList<IVariable>();
- for (ELSegment segment : segments) {
- if(!segment.getVariables().isEmpty()) {
- usedVariables.addAll(segment.getVariables());
- }
- // Check pair for getter/setter
- if(segment instanceof JavaMemberELSegmentImpl) {
- JavaMemberELSegmentImpl javaSegment = (JavaMemberELSegmentImpl)segment;
- if(!javaSegment.getUnpairedGettersOrSetters().isEmpty()) {
- TypeInfoCollector.MethodInfo unpairedMethod = javaSegment.getUnpairedGettersOrSetters().values().iterator().next();
- String methodName = unpairedMethod.getName();
- String propertyName = javaSegment.getUnpairedGettersOrSetters().keySet().iterator().next();
- String missingMethodName = ELValidationMessages.EL_VALIDATOR_SETTER;
- String existedMethodName = ELValidationMessages.EL_VALIDATOR_GETTER;
- if(methodName.startsWith("s")) { //$NON-NLS-1$
- missingMethodName = existedMethodName;
- existedMethodName = ELValidationMessages.EL_VALIDATOR_SETTER;
- }
- int startPosition = documnetOffset + operandToken.getStartPosition();
- int length = operandToken.getLength();
- int startPr = operand.indexOf(propertyName);
- if(startPr>-1) {
- startPosition = startPosition + startPr;
- length = propertyName.length();
- }
- markers++;
-
- IJavaSourceReference reference = getJavaReference(file, startPosition, length);
-
- if(reference != null) {
- IMarker marker = addError(ELValidationMessages.UNPAIRED_GETTER_OR_SETTER, ELSeverityPreferences.UNPAIRED_GETTER_OR_SETTER, new String[]{propertyName, existedMethodName, missingMethodName}, reference, file);
- elReference.addMarker(marker);
- } else {
- IMarker marker = addError(ELValidationMessages.UNPAIRED_GETTER_OR_SETTER, ELSeverityPreferences.UNPAIRED_GETTER_OR_SETTER, new String[]{propertyName, existedMethodName, missingMethodName}, elReference.getLineNumber(), length, startPosition, file);
- elReference.addMarker(marker);
- }
-
+ List<ELSegment> segments = resolution.getSegments();
+ List<IVariable> usedVariables = new ArrayList<IVariable>();
+ for (ELSegment segment : segments) {
+ if(!segment.getVariables().isEmpty()) {
+ usedVariables.addAll(segment.getVariables());
+ }
+ // Check pair for getter/setter
+ if(segment instanceof JavaMemberELSegmentImpl) {
+ JavaMemberELSegmentImpl javaSegment = (JavaMemberELSegmentImpl)segment;
+ if(!javaSegment.getUnpairedGettersOrSetters().isEmpty()) {
+ TypeInfoCollector.MethodInfo unpairedMethod = javaSegment.getUnpairedGettersOrSetters().values().iterator().next();
+ String methodName = unpairedMethod.getName();
+ String propertyName = javaSegment.getUnpairedGettersOrSetters().keySet().iterator().next();
+ String missingMethodName = ELValidationMessages.EL_VALIDATOR_SETTER;
+ String existedMethodName = ELValidationMessages.EL_VALIDATOR_GETTER;
+ if(methodName.startsWith("s")) { //$NON-NLS-1$
+ missingMethodName = existedMethodName;
+ existedMethodName = ELValidationMessages.EL_VALIDATOR_SETTER;
}
+ int startPosition = documnetOffset + operandToken.getStartPosition();
+ int length = operandToken.getLength();
+ int startPr = operand.indexOf(propertyName);
+ if(startPr>-1) {
+ startPosition = startPosition + startPr;
+ length = propertyName.length();
+ }
+ markers++;
+
+ IJavaSourceReference reference = getJavaReference(file, startPosition, length);
+
+ if(reference != null) {
+ IMarker marker = addError(ELValidationMessages.UNPAIRED_GETTER_OR_SETTER, ELSeverityPreferences.UNPAIRED_GETTER_OR_SETTER, new String[]{propertyName, existedMethodName, missingMethodName}, reference, file);
+ elReference.addMarker(marker);
+ } else {
+ IMarker marker = addError(ELValidationMessages.UNPAIRED_GETTER_OR_SETTER, ELSeverityPreferences.UNPAIRED_GETTER_OR_SETTER, new String[]{propertyName, existedMethodName, missingMethodName}, elReference.getLineNumber(), length, startPosition, file);
+ elReference.addMarker(marker);
+ }
+
}
}
- // Save links between resource and used variables names
- for(IVariable variable: usedVariables) {
- validationContext.addLinkedEl(variable.getName(), elReference);
- }
+ }
+ // Save links between resource and used variables names
+ for(IVariable variable: usedVariables) {
+ validationContext.addLinkedEl(variable.getName(), elReference);
+ }
- if (resolution.isResolved() || !resolution.isValidatable()) {
- // It's valid EL or we should ignore it.
- return;
- }
+ if (resolution.isResolved() || !resolution.isValidatable()) {
+ // It's valid EL or we should ignore it.
+ return;
+ }
- ELSegment segment = resolution.getUnresolvedSegment();
- if(segment==null) {
- return;
- }
- LexicalToken token = segment.getToken();
+ ELSegment segment = resolution.getUnresolvedSegment();
+ if(segment==null) {
+ return;
+ }
+ LexicalToken token = segment.getToken();
- varName = token.getText();
- if(varName == null) {
- //This is syntax error case. Reported by parser.
- return;
- }
- offsetOfVarName = documnetOffset + token.getStart();
- lengthOfVarName = varName == null ? 0 : varName.length();
- if(usedVariables.isEmpty()) {
- unresolvedTokenIsVariable = true;
- }
+ varName = token.getText();
+ if(varName == null) {
+ //This is syntax error case. Reported by parser.
+ return;
}
+ offsetOfVarName = documnetOffset + token.getStart();
+ lengthOfVarName = varName == null ? 0 : varName.length();
+ if(usedVariables.isEmpty()) {
+ unresolvedTokenIsVariable = true;
+ }
markers++;
IJavaSourceReference reference = getJavaReference(file, offsetOfVarName, lengthOfVarName);
@@ -425,7 +422,6 @@
} else {
marker = addError(ELValidationMessages.UNKNOWN_EL_VARIABLE_NAME, ELSeverityPreferences.UNKNOWN_EL_VARIABLE_NAME, new String[]{varName}, reference, file);
}
-
} else {
if(reference == null) {
marker = addError(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME, ELSeverityPreferences.UNKNOWN_EL_VARIABLE_PROPERTY_NAME, new String[]{varName}, elReference.getLineNumber(), lengthOfVarName, offsetOfVarName, file);
@@ -433,7 +429,7 @@
marker = addError(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME, ELSeverityPreferences.UNKNOWN_EL_VARIABLE_PROPERTY_NAME, new String[]{varName}, reference, file);
}
}
-
+
if(marker != null) {
elReference.addMarker(marker);
}
12 years, 12 months
JBoss Tools SVN: r37947 - trunk/build/parent.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-01-18 12:53:04 -0500 (Wed, 18 Jan 2012)
New Revision: 37947
Modified:
trunk/build/parent/pom.xml
Log:
remove GWT site from pom -- no longer needed per JBIDE-10595
Modified: trunk/build/parent/pom.xml
===================================================================
--- trunk/build/parent/pom.xml 2012-01-18 17:52:52 UTC (rev 37946)
+++ trunk/build/parent/pom.xml 2012-01-18 17:53:04 UTC (rev 37947)
@@ -455,7 +455,7 @@
</profile>
<!-- GWT dependencies which we can't mirror and must reference directly. -->
- <profile>
+ <!-- no longer needed (https://issues.jboss.org/browse/JBIDE-10595) <profile>
<id>gwt</id>
<activation>
<activeByDefault>false</activeByDefault>
@@ -473,7 +473,7 @@
</releases>
</repository>
</repositories>
- </profile>
+ </profile> -->
<profile>
<id>osx</id>
12 years, 12 months
JBoss Tools SVN: r37946 - trunk/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-01-18 12:52:52 -0500 (Wed, 18 Jan 2012)
New Revision: 37946
Modified:
trunk/build/pom-core.xml
Log:
remove GWT site from pom -- no longer needed per JBIDE-10595; also add richfaces profile (copy from pom.xml)
Modified: trunk/build/pom-core.xml
===================================================================
--- trunk/build/pom-core.xml 2012-01-18 17:52:43 UTC (rev 37945)
+++ trunk/build/pom-core.xml 2012-01-18 17:52:52 UTC (rev 37946)
@@ -533,6 +533,20 @@
</profile>
<profile>
+ <id>richfaces</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <modules>
+ <module>../tests</module>
+ <module>../common</module>
+ <module>../jst</module>
+ <module>../vpe</module>
+ <module>../jsf</module>
+ </modules>
+ </profile>
+
+ <profile>
<id>usage</id>
<activation>
<activeByDefault>true</activeByDefault>
@@ -594,8 +608,7 @@
</profiles>
<repositories>
- <!-- Cannot redistribute GWT plugins due to license therefore cannot be included in target platform; must reference as 3rd party URL -->
- <repository>
+ <!-- no longer needed (https://issues.jboss.org/browse/JBIDE-10595) <repository>
<id>gwt-e37</id>
<url>http://dl.google.com/eclipse/plugin/3.7/</url>
<layout>p2</layout>
@@ -605,7 +618,7 @@
<releases>
<enabled>true</enabled>
</releases>
- </repository>
+ </repository> -->
<!-- no longer needed (https://issues.jboss.org/browse/JBIDE-9585) <repository>
<id>egit11</id>
<url>http://download.jboss.org/jbosstools/updates/requirements/egit/1.1.0.2011...</url>
12 years, 12 months
JBoss Tools SVN: r37945 - in trunk/build/aggregate: site and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-01-18 12:52:43 -0500 (Wed, 18 Jan 2012)
New Revision: 37945
Modified:
trunk/build/aggregate/bottests-site/site/associate.properties
trunk/build/aggregate/site/associate.properties
trunk/build/aggregate/site/sources/associate.properties
Log:
remove GWT site from pom -- no longer needed per JBIDE-10595
Modified: trunk/build/aggregate/bottests-site/site/associate.properties
===================================================================
--- trunk/build/aggregate/bottests-site/site/associate.properties 2012-01-18 17:52:27 UTC (rev 37944)
+++ trunk/build/aggregate/bottests-site/site/associate.properties 2012-01-18 17:52:43 UTC (rev 37945)
@@ -4,4 +4,4 @@
#update.site.version=3.2.0.M2.2010-07-16_13-26-18-H21
# associate sites to add to the resulting repo
-associate.sites=http://download.jboss.org/jbosstools/updates/indigo/SR1/,http://download.jboss.org/jbosstools/updates/development/indigo/,http://dl.google.com/eclipse/plugin/3.7/
+associate.sites=http://download.jboss.org/jbosstools/updates/indigo/SR1/,http://download.jboss.org/jbosstools/updates/development/indigo/
Modified: trunk/build/aggregate/site/associate.properties
===================================================================
--- trunk/build/aggregate/site/associate.properties 2012-01-18 17:52:27 UTC (rev 37944)
+++ trunk/build/aggregate/site/associate.properties 2012-01-18 17:52:43 UTC (rev 37945)
@@ -4,4 +4,4 @@
#update.site.version=3.2.0.M2.2010-07-16_13-26-18-H21
# associate sites to add to the resulting repo
-associate.sites=http://download.jboss.org/jbosstools/updates/indigo/SR1/,http://dl.google.com/eclipse/plugin/3.7/
+associate.sites=http://download.jboss.org/jbosstools/updates/indigo/SR1/
Modified: trunk/build/aggregate/site/sources/associate.properties
===================================================================
--- trunk/build/aggregate/site/sources/associate.properties 2012-01-18 17:52:27 UTC (rev 37944)
+++ trunk/build/aggregate/site/sources/associate.properties 2012-01-18 17:52:43 UTC (rev 37945)
@@ -4,4 +4,4 @@
#update.site.version=3.2.0.M2.2010-07-16_13-26-18-H21
# associate sites to add to the resulting repo
-associate.sites=http://download.jboss.org/jbosstools/updates/indigo/SR1/,http://download.jboss.org/jbosstools/updates/development/indigo/,http://dl.google.com/eclipse/plugin/3.7/
+associate.sites=http://download.jboss.org/jbosstools/updates/indigo/SR1/,http://download.jboss.org/jbosstools/updates/development/indigo/
12 years, 12 months
JBoss Tools SVN: r37944 - trunk/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-01-18 12:52:27 -0500 (Wed, 18 Jan 2012)
New Revision: 37944
Modified:
trunk/build/pom.xml
Log:
remove GWT site from pom -- no longer needed per JBIDE-10595; also add parent profile (copy from pom-core.xml) per JBIDE-7565
Modified: trunk/build/pom.xml
===================================================================
--- trunk/build/pom.xml 2012-01-18 15:57:06 UTC (rev 37943)
+++ trunk/build/pom.xml 2012-01-18 17:52:27 UTC (rev 37944)
@@ -18,6 +18,16 @@
-->
<profile>
+ <id>parent</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <modules>
+ <module>parent</module>
+ </modules>
+ </profile>
+
+ <profile>
<id>libs</id>
<activation>
<activeByDefault>true</activeByDefault>
@@ -718,8 +728,7 @@
</profiles>
<repositories>
- <!-- Cannot redistribute GWT plugins due to license therefore cannot be included in target platform; must reference as 3rd party URL -->
- <repository>
+ <!-- no longer needed (https://issues.jboss.org/browse/JBIDE-10595) <repository>
<id>gwt-e37</id>
<url>http://dl.google.com/eclipse/plugin/3.7/</url>
<layout>p2</layout>
@@ -729,7 +738,7 @@
<releases>
<enabled>true</enabled>
</releases>
- </repository>
+ </repository> -->
<!-- no longer needed (https://issues.jboss.org/browse/JBIDE-9585) <repository>
<id>egit11</id>
<url>http://download.jboss.org/jbosstools/updates/requirements/egit/1.1.0.2011...</url>
12 years, 12 months