JBoss Tools SVN: r27769 - trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-28 11:46:41 -0500 (Tue, 28 Dec 2010)
New Revision: 27769
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/RenameMethodParticipant.java
Log:
JBIDE-8011
https://issues.jboss.org/browse/JBIDE-8011
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/RenameMethodParticipant.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/RenameMethodParticipant.java 2010-12-28 16:40:48 UTC (rev 27768)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/RenameMethodParticipant.java 2010-12-28 16:46:41 UTC (rev 27769)
@@ -35,6 +35,7 @@
import org.eclipse.text.edits.ReplaceEdit;
import org.eclipse.text.edits.TextEdit;
import org.jboss.tools.common.model.project.ProjectHome;
+import org.jboss.tools.common.util.BeanUtil;
import org.jboss.tools.jsf.el.refactoring.ELProjectSetExtension;
import org.jboss.tools.jsf.el.refactoring.ProjectsSet;
import org.jboss.tools.jsf.ui.JsfUIMessages;
@@ -56,16 +57,16 @@
CheckConditionsContext context) throws OperationCanceledException {
if(searcher == null)
return status;
- if(element instanceof IMethod){
+ if(element instanceof IMethod) {
IMethod method = (IMethod)element;
IMethod anotherMethod = getAnotherMethod();
if(method != null){
- if(searcher.isGetter(method)){
- if(anotherMethod == null || searcher.isGetter(anotherMethod))
+ if(BeanUtil.isGetter(method)){
+ if(anotherMethod == null || BeanUtil.isGetter(anotherMethod))
status.addWarning(JsfUIMessages.RENAME_METHOD_PARTICIPANT_GETTER_WARNING);
- }else if(searcher.isSetter(method)){
- if(anotherMethod == null || searcher.isSetter(anotherMethod))
+ }else if(BeanUtil.isSetter(method)){
+ if(anotherMethod == null || BeanUtil.isSetter(anotherMethod))
status.addWarning(JsfUIMessages.RENAME_METHOD_PARTICIPANT_SETTER_WARNING);
}
14 years
JBoss Tools SVN: r27768 - trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-28 11:40:48 -0500 (Tue, 28 Dec 2010)
New Revision: 27768
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/BeanUtil.java
Log:
JBIDE-8011
https://issues.jboss.org/browse/JBIDE-8011
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/BeanUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/BeanUtil.java 2010-12-28 16:38:00 UTC (rev 27767)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/BeanUtil.java 2010-12-28 16:40:48 UTC (rev 27768)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.common.util;
+import org.eclipse.jdt.core.IMethod;
+
/**
*
* @author V. Kabanovich
@@ -31,6 +33,14 @@
&& numberOfParameters == 1);
}
+ public static boolean isGetter(IMethod method) {
+ return isGetter(method.getElementName(), method.getNumberOfParameters());
+ }
+
+ public static boolean isSetter(IMethod method) {
+ return isSetter(method.getElementName(), method.getNumberOfParameters());
+ }
+
public static String getPropertyName(String methodName) {
if(isGetter(methodName, 0) || isSetter(methodName, 1)) {
StringBuffer name = new StringBuffer(methodName);
14 years
JBoss Tools SVN: r27767 - trunk/common/tests/org.jboss.tools.common.test/META-INF.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-28 11:38:00 -0500 (Tue, 28 Dec 2010)
New Revision: 27767
Modified:
trunk/common/tests/org.jboss.tools.common.test/META-INF/MANIFEST.MF
Log:
JBIDE-8011
https://issues.jboss.org/browse/JBIDE-8011
Modified: trunk/common/tests/org.jboss.tools.common.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/tests/org.jboss.tools.common.test/META-INF/MANIFEST.MF 2010-12-28 16:26:33 UTC (rev 27766)
+++ trunk/common/tests/org.jboss.tools.common.test/META-INF/MANIFEST.MF 2010-12-28 16:38:00 UTC (rev 27767)
@@ -7,6 +7,7 @@
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
+ org.eclipse.jdt.core,
org.junit,
org.jboss.tools.common,
org.jboss.tools.tests,
14 years
JBoss Tools SVN: r27766 - in trunk/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common: util/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-28 11:26:33 -0500 (Tue, 28 Dec 2010)
New Revision: 27766
Added:
trunk/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/util/test/BeanUtilTest.java
Modified:
trunk/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/test/CommonAllTests.java
Log:
JBIDE-8011
https://issues.jboss.org/browse/JBIDE-8011
Modified: trunk/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/test/CommonAllTests.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/test/CommonAllTests.java 2010-12-28 16:10:41 UTC (rev 27765)
+++ trunk/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/test/CommonAllTests.java 2010-12-28 16:26:33 UTC (rev 27766)
@@ -15,6 +15,7 @@
import junit.framework.TestSuite;
import org.jboss.tools.common.reporting.test.ProblemReportingHelperTest;
+import org.jboss.tools.common.util.test.BeanUtilTest;
import org.jboss.tools.common.util.test.HttpUtilTest;
import org.jboss.tools.common.xml.test.SAXValidatorTest;
import org.jboss.tools.common.xml.test.XMLUtilitiesTest;
@@ -34,6 +35,7 @@
suite.addTest(ZipAllTests.suite());
suite.addTestSuite(MessagesTest.class);
suite.addTestSuite(MethodNotImplementedExceptionTest.class);
+ suite.addTestSuite(BeanUtilTest.class);
return suite;
}
}
\ No newline at end of file
Added: trunk/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/util/test/BeanUtilTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/util/test/BeanUtilTest.java (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/util/test/BeanUtilTest.java 2010-12-28 16:26:33 UTC (rev 27766)
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.util.test;
+
+import java.io.IOException;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.jboss.tools.common.util.BeanUtil;
+import org.jboss.tools.common.util.HttpUtil;
+
+import junit.framework.TestCase;
+
+public class BeanUtilTest extends TestCase {
+
+ public void testBeanUtil() throws IOException {
+ assertTrue(BeanUtil.isGetter("getX", 0));
+ assertFalse(BeanUtil.isGetter("getX", 1));
+ assertFalse(BeanUtil.isGetter("get", 0));
+ assertFalse(BeanUtil.isGetter("g", 0));
+ assertFalse(BeanUtil.isGetter("a", 0));
+ assertFalse(BeanUtil.isGetter("agetX", 0));
+
+ assertTrue(BeanUtil.isGetter("isBig", 0));
+ assertFalse(BeanUtil.isGetter("is", 0));
+
+ assertTrue(BeanUtil.isSetter("setX", 1));
+ assertFalse(BeanUtil.isSetter("setX", 0));
+ assertFalse(BeanUtil.isSetter("set", 1));
+ assertFalse(BeanUtil.isSetter("s", 1));
+ assertFalse(BeanUtil.isSetter("a", 1));
+ assertFalse(BeanUtil.isSetter("asetX", 1));
+
+ assertEquals("x", BeanUtil.getPropertyName("getX"));
+ assertEquals("x", BeanUtil.getPropertyName("setX"));
+ assertEquals("x", BeanUtil.getPropertyName("isX"));
+ assertEquals("X0", BeanUtil.getPropertyName("isX0"));
+ assertEquals("xo", BeanUtil.getPropertyName("isXo"));
+ assertEquals("XO", BeanUtil.getPropertyName("isXO"));
+ }
+
+}
Property changes on: trunk/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/util/test/BeanUtilTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years
JBoss Tools SVN: r27765 - trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-28 11:10:41 -0500 (Tue, 28 Dec 2010)
New Revision: 27765
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java
Log:
JBIDE-8011
https://issues.jboss.org/browse/JBIDE-8011
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java 2010-12-28 16:06:41 UTC (rev 27764)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java 2010-12-28 16:10:41 UTC (rev 27765)
@@ -36,6 +36,7 @@
import org.jboss.tools.common.el.core.ELCorePlugin;
import org.jboss.tools.common.el.core.ca.preferences.ELContentAssistPreferences;
import org.jboss.tools.common.model.util.EclipseJavaUtil;
+import org.jboss.tools.common.util.BeanUtil;
/**
* This class helps to collect information of java elements used in Seam EL.
@@ -585,15 +586,11 @@
}
public boolean isGetter() {
- if (null == getType()) {
- return false;
- }
-
- return (((getName().startsWith("get") && !getName().equals("get")) || getName().startsWith("is")) && getNumberOfParameters() == 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ return getType() != null && BeanUtil.isGetter(getName(), getNumberOfParameters());
}
public boolean isSetter() {
- return ((getName().startsWith("set") && !getName().equals("set")) && getNumberOfParameters() == 1); //$NON-NLS-1$ //$NON-NLS-2$
+ return BeanUtil.isSetter(getName(), getNumberOfParameters());
}
public List<String> getAsPresentedStrings() {
@@ -1200,16 +1197,8 @@
MethodInfo m = (MethodInfo)info;
if (m.isGetter() || m.isSetter()) {
- StringBuffer name = new StringBuffer(m.getName());
- if(m.getName().startsWith("i")) { //$NON-NLS-1$
- name.delete(0, 2);
- } else {
- name.delete(0, 3);
- }
- if(name.length()<2 || Character.isLowerCase(name.charAt(1))) {
- name.setCharAt(0, Character.toLowerCase(name.charAt(0)));
- }
- String propertyName = name.toString();
+ String propertyName = BeanUtil.getPropertyName(m.getName());
+ if(propertyName == null) continue;
MemberPresentation pr = new MemberPresentation(propertyName, propertyName, m);
if(!properties.contains(pr)) {
properties.add(pr);
14 years
JBoss Tools SVN: r27764 - trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-28 11:06:41 -0500 (Tue, 28 Dec 2010)
New Revision: 27764
Added:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/BeanUtil.java
Log:
JBIDE-8011
https://issues.jboss.org/browse/JBIDE-8011
Added: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/BeanUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/BeanUtil.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/BeanUtil.java 2010-12-28 16:06:41 UTC (rev 27764)
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.util;
+
+/**
+ *
+ * @author V. Kabanovich
+ *
+ */
+public class BeanUtil {
+ public static final String GET = "get"; //$NON-NLS-1$
+ public static final String SET = "set"; //$NON-NLS-1$
+ public static final String IS = "is"; //$NON-NLS-1$
+
+ public static boolean isGetter(String methodName, int numberOfParameters) {
+ return (((methodName.startsWith(GET) && !methodName.equals(GET))
+ || (methodName.startsWith(IS) && !methodName.equals(IS)))
+ && numberOfParameters == 0);
+ }
+
+ public static boolean isSetter(String methodName, int numberOfParameters) {
+ return (((methodName.startsWith(SET) && !methodName.equals(SET)))
+ && numberOfParameters == 1);
+ }
+
+ public static String getPropertyName(String methodName) {
+ if(isGetter(methodName, 0) || isSetter(methodName, 1)) {
+ StringBuffer name = new StringBuffer(methodName);
+ if(methodName.startsWith(IS)) {
+ name.delete(0, 2);
+ } else {
+ name.delete(0, 3);
+ }
+ if(name.length() < 2 || Character.isLowerCase(name.charAt(1))) {
+ name.setCharAt(0, Character.toLowerCase(name.charAt(0)));
+ }
+ return name.toString();
+ }
+ return null;
+ }
+
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/BeanUtil.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years
JBoss Tools SVN: r27763 - in trunk/jsf/tests/org.jboss.tools.jsf.ui.test: src/org/jboss/tools/jsf/ui/test/refactoring and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-12-28 10:20:13 -0500 (Tue, 28 Dec 2010)
New Revision: 27763
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/testJSFProject/WebContent/pages/hello2.jsp
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/refactoring/ELReferencesRenameTest.java
Log:
https://issues.jboss.org/browse/JBIDE-8010 fixed jsf ui tests
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/testJSFProject/WebContent/pages/hello2.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/testJSFProject/WebContent/pages/hello2.jsp 2010-12-28 14:15:14 UTC (rev 27762)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/testJSFProject/WebContent/pages/hello2.jsp 2010-12-28 15:20:13 UTC (rev 27763)
@@ -13,7 +13,7 @@
<f:view>
<h3>
<h:outputText value="#{Message.hello_message}" />,
- <h:outputText value="#{user.name}" />!
+ <h:outputText value=" user.name " />!
</h3>
</f:view>
</body>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/refactoring/ELReferencesRenameTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/refactoring/ELReferencesRenameTest.java 2010-12-28 14:15:14 UTC (rev 27762)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/refactoring/ELReferencesRenameTest.java 2010-12-28 15:20:13 UTC (rev 27763)
@@ -19,18 +19,14 @@
import org.jboss.tools.test.util.JobUtils;
public class ELReferencesRenameTest extends ELRefactoringTest {
-
public ELReferencesRenameTest(){
super("Rename Method Refactoring Test");
}
-
-
public void testRenameMethod() throws CoreException {
ArrayList<TestChangeStructure> list = new ArrayList<TestChangeStructure>();
-
TestChangeStructure structure = new TestChangeStructure(jsfProject, "/WebContent/pages/hello.jsp");
TestTextChange change = new TestTextChange(353, 4, "name");
structure.addTextChange(change);
@@ -40,34 +36,33 @@
change = new TestTextChange(499, 4, "name");
structure.addTextChange(change);
list.add(structure);
-
+
IMethod method = getJavaMethod(jsfProject, "demo.User", "getName");
renameELReferences(method, "alias", list);
}
-
+
private void renameELReferences(IJavaElement element, String newName, List<TestChangeStructure> changeList) throws CoreException{
JobUtils.waitForIdle();
-
// Rename EL references
RenameMethodParticipant participant = new RenameMethodParticipant();
participant.initialize(element, newName);
RefactoringStatus status = participant.checkConditions(new NullProgressMonitor(), null);
-
+
assertNotNull("Rename participant returned null status", status);
-
+
assertFalse("There is fatal errors in rename participant", status.hasFatalError());
-
+
CompositeChange rootChange = (CompositeChange)participant.createChange(new NullProgressMonitor());
-
+
assertEquals("There is unexpected number of changes",changeList.size(), rootChange.getChildren().length);
for(int i = 0; i < rootChange.getChildren().length;i++){
TextFileChange fileChange = (TextFileChange)rootChange.getChildren()[i];
MultiTextEdit edit = (MultiTextEdit)fileChange.getEdit();
-
+
TestChangeStructure change = findChange(changeList, fileChange.getFile());
if(change != null){
assertEquals(change.size(), edit.getChildrenSize());
14 years
JBoss Tools SVN: r27762 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-28 09:15:14 -0500 (Tue, 28 Dec 2010)
New Revision: 27762
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIProjectSet.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIProjectTree.java
Log:
JBIDE-7948
https://issues.jboss.org/browse/JBIDE-7948
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIProjectSet.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIProjectSet.java 2010-12-28 14:11:43 UTC (rev 27761)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIProjectSet.java 2010-12-28 14:15:14 UTC (rev 27762)
@@ -61,29 +61,13 @@
if(allProjects.contains(nature.getProject())) {
return project;
}
+ if(!nature.getProject().isAccessible()) continue;
allProjects.add(nature.getProject());
return addIncludingProjects(nature);
}
return project;
}
- private Set<CDICoreNature> getRootProjects(CDICoreNature project) {
- Set<CDICoreNature> result = new HashSet<CDICoreNature>();
- Set<CDICoreNature> dependentProjects = project.getDependentProjects();
- if(dependentProjects.isEmpty()) {
- result.add(project);
- } else if(dependentProjects.size()==1) {
- result = getRootProjects(dependentProjects.iterator().next());
- } else {
- for (CDICoreNature nature : dependentProjects) {
- if(!result.contains(nature)) {
- result.addAll(getRootProjects(nature));
- }
- }
- }
- return result;
- }
-
private void addIncludedProjects(CDICoreNature project) {
Set<CDICoreNature> includedCdiProjects = project.getCDIProjects();
for (CDICoreNature cdiCoreNature : includedCdiProjects) {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIProjectTree.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIProjectTree.java 2010-12-28 14:11:43 UTC (rev 27761)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIProjectTree.java 2010-12-28 14:15:14 UTC (rev 27762)
@@ -107,10 +107,9 @@
Set<CDICoreNature> dependentProjects = project.getDependentProjects();
if(dependentProjects.isEmpty()) {
result.add(project);
- } else if(dependentProjects.size()==1) {
- result = getRootProjects(dependentProjects.iterator().next());
} else {
for (CDICoreNature nature : dependentProjects) {
+ if(!nature.getProject().isAccessible()) continue;
if(!result.contains(nature)) {
result.addAll(getRootProjects(nature));
}
14 years
JBoss Tools SVN: r27761 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-28 09:11:43 -0500 (Tue, 28 Dec 2010)
New Revision: 27761
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java
Log:
JBIDE-7948
https://issues.jboss.org/browse/JBIDE-7948
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java 2010-12-28 13:38:00 UTC (rev 27760)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java 2010-12-28 14:11:43 UTC (rev 27761)
@@ -896,7 +896,7 @@
*/
public static boolean checkKBBuilderInstalled(IResource resource) {
IProject project = resource == null || !resource.isAccessible() ? null : resource.getProject();
- if (project == null)
+ if (project == null || !project.isAccessible())
return false; // Cannot check anything
String[] descriptions = getKBBuilderRequiredNatureDescriptions(project);
14 years
JBoss Tools SVN: r27760 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-28 08:38:00 -0500 (Tue, 28 Dec 2010)
New Revision: 27760
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/ClassPathMonitor.java
Log:
JBIDE-7948
https://issues.jboss.org/browse/JBIDE-7948
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/ClassPathMonitor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/ClassPathMonitor.java 2010-12-27 23:17:22 UTC (rev 27759)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/ClassPathMonitor.java 2010-12-28 13:38:00 UTC (rev 27760)
@@ -161,7 +161,7 @@
List<KbProject> getKbProjects(IProject project) throws CoreException {
List<KbProject> list = new ArrayList<KbProject>();
- if(project.hasNature(JavaCore.NATURE_ID)) {
+ if(project.isAccessible() && project.hasNature(JavaCore.NATURE_ID)) {
IJavaProject javaProject = JavaCore.create(project);
IClasspathEntry[] es = javaProject.getResolvedClasspath(true);
for (int i = 0; i < es.length; i++) {
14 years