JBoss Tools SVN: r37702 - trunk/common/plugins/org.jboss.tools.common.ui.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-01-06 16:31:50 -0500 (Fri, 06 Jan 2012)
New Revision: 37702
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml
Log:
fixed xml syntax error in plugin.xml
Modified: trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml 2012-01-06 21:11:31 UTC (rev 37701)
+++ trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml 2012-01-06 21:31:50 UTC (rev 37702)
@@ -54,6 +54,7 @@
id="org.jboss.tools.common.ui.JBossPerspective"
name="%perspective.name">
</perspective>
+ </extension>
<extension
point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
@@ -69,7 +70,6 @@
</perspectiveShortcut>
</perspectiveExtension>
</extension>
- </extension>
<extension point="org.eclipse.ui.ide.markerResolution">
<markerResolutionGenerator
class="org.jboss.tools.common.ui.marker.ConfigureProblemSeverityResolutionGenerator"/>
12 years, 11 months
JBoss Tools SVN: r37701 - trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-01-06 16:11:31 -0500 (Fri, 06 Jan 2012)
New Revision: 37701
Modified:
trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectTest.java
Log:
JBIDE-10602 Project Examples tests fail
Modified: trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectTest.java
===================================================================
--- trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectTest.java 2012-01-06 21:01:40 UTC (rev 37700)
+++ trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectTest.java 2012-01-06 21:11:31 UTC (rev 37701)
@@ -210,6 +210,10 @@
for (int i = 0; i < projectMarkers.length; i++) {
if (projectMarkers[i].getAttribute(IMarker.SEVERITY,
IMarker.SEVERITY_ERROR) == IMarker.SEVERITY_ERROR) {
+ // ignore XHTML errors
+ if ("org.jboss.tools.jsf.xhtmlsyntaxproblem".equals(projectMarkers[i].getType())) {
+ continue;
+ }
String message = projectMarkers[i].getAttribute(IMarker.MESSAGE, null);
String location = projectMarkers[i].getAttribute(IMarker.LOCATION, null);
String lineNumber = projectMarkers[i].getAttribute(IMarker.LINE_NUMBER, null);
12 years, 11 months
JBoss Tools SVN: r37700 - in trunk: jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-01-06 16:01:40 -0500 (Fri, 06 Jan 2012)
New Revision: 37700
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/RenameMessagePropertyProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRefactorSearcher.java
Log:
Ctrl+Shift+G on a java element doesn't work for complex ELs https://issues.jboss.org/browse/JBIDE-10593
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/RenameMessagePropertyProcessor.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/RenameMessagePropertyProcessor.java 2012-01-06 20:43:13 UTC (rev 37699)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/RenameMessagePropertyProcessor.java 2012-01-06 21:01:40 UTC (rev 37700)
@@ -188,9 +188,6 @@
int offset = reference.getStartPosition();
for(ELExpression operand : reference.getEl()){
for (ELResolver resolver : resolvers) {
- if (!(resolver instanceof ELCompletionEngine))
- continue;
-
ELResolution resolution = resolver.resolve(context, operand, offset);
if(resolution == null)
@@ -205,9 +202,6 @@
for(ELObject child : operand.getChildren()){
if(child instanceof ELExpression){
for (ELResolver resolver : resolvers) {
- if (!(resolver instanceof ELCompletionEngine))
- continue;
-
ELResolution resolution = resolver.resolve(context, (ELExpression)child, offset);
if(resolution == null)
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java 2012-01-06 20:43:13 UTC (rev 37699)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java 2012-01-06 21:01:40 UTC (rev 37700)
@@ -271,7 +271,7 @@
private void resolveByResolvers(ELExpression operand, ELResolver[] resolvers, ELContext context, IRelevanceCheck[] checks, int offset, List<MatchArea> areas, IFile file){
for (int i = 0; i < resolvers.length; i++) {
ELResolver resolver = resolvers[i];
- if (!(resolver instanceof ELCompletionEngine) || !checks[i].isRelevant(operand.getText()))
+ if (!checks[i].isRelevant(operand.getText()))
continue;
ELResolution resolution = resolver.resolve(context, operand, offset);
@@ -496,9 +496,6 @@
.getResolvers(file);
for (ELResolver resolver : resolvers) {
- if (!(resolver instanceof ELCompletionEngine))
- continue;
-
SimpleELContext context = new SimpleELContext();
context.setResource(file);
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRefactorSearcher.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRefactorSearcher.java 2012-01-06 20:43:13 UTC (rev 37699)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRefactorSearcher.java 2012-01-06 21:01:40 UTC (rev 37700)
@@ -117,9 +117,6 @@
.getResolvers(file);
for (ELResolver resolver : resolvers) {
- if (!(resolver instanceof ELCompletionEngine))
- continue;
-
SimpleELContext context = new SimpleELContext();
context.setResource(file);
12 years, 11 months
JBoss Tools SVN: r37699 - in trunk: jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-01-06 15:43:13 -0500 (Fri, 06 Jan 2012)
New Revision: 37699
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/ELRefactorContributionFactory.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/RenameMessagePropertyProcessor.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/hello.jsp
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/MessagePropertyRefactoringTest.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java
Log:
Ctrl+Shift+G on a java element doesn't work for complex ELs https://issues.jboss.org/browse/JBIDE-10593
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/RenameMessagePropertyProcessor.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/RenameMessagePropertyProcessor.java 2012-01-06 20:19:35 UTC (rev 37698)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/RenameMessagePropertyProcessor.java 2012-01-06 20:43:13 UTC (rev 37699)
@@ -29,6 +29,7 @@
import org.jboss.tools.common.el.core.ELReference;
import org.jboss.tools.common.el.core.ElCoreMessages;
import org.jboss.tools.common.el.core.model.ELExpression;
+import org.jboss.tools.common.el.core.model.ELObject;
import org.jboss.tools.common.el.core.resolver.ELCompletionEngine;
import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.el.core.resolver.ELResolution;
@@ -201,6 +202,25 @@
match(file, offset+segment.getSourceReference().getStartPosition(), segment.getSourceReference().getLength());
}
}
+ for(ELObject child : operand.getChildren()){
+ if(child instanceof ELExpression){
+ for (ELResolver resolver : resolvers) {
+ if (!(resolver instanceof ELCompletionEngine))
+ continue;
+
+ ELResolution resolution = resolver.resolve(context, (ELExpression)child, offset);
+
+ if(resolution == null)
+ continue;
+
+ List<ELSegment> segments = resolution.findSegmentsByMessageProperty(segment.getBaseName(), propertyName);
+
+ for(ELSegment segment : segments){
+ match(file, offset+segment.getSourceReference().getStartPosition(), segment.getSourceReference().getLength());
+ }
+ }
+ }
+ }
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java 2012-01-06 20:19:35 UTC (rev 37698)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java 2012-01-06 20:43:13 UTC (rev 37699)
@@ -560,7 +560,7 @@
if(property == null) continue;
segment.addObject(property);
- PositionHolder h = PositionHolder.getPosition(p, null);
+ PositionHolder h = PositionHolder.getPosition(property, null);
h.update();
segment.setMessagePropertySourceReference(h.getStart(), name.length());
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/ELRefactorContributionFactory.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/ELRefactorContributionFactory.java 2012-01-06 20:19:35 UTC (rev 37698)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/ELRefactorContributionFactory.java 2012-01-06 20:43:13 UTC (rev 37699)
@@ -32,7 +32,7 @@
import org.eclipse.ui.services.IServiceLocator;
import org.jboss.tools.common.el.core.ELReference;
import org.jboss.tools.common.el.core.model.ELExpression;
-import org.jboss.tools.common.el.core.resolver.ELCompletionEngine;
+import org.jboss.tools.common.el.core.model.ELObject;
import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.el.core.resolver.ELResolution;
import org.jboss.tools.common.el.core.resolver.ELResolver;
@@ -163,30 +163,47 @@
ELResolver[] resolvers = context.getElResolvers();
for(ELExpression operand : reference.getEl()){
- for (ELResolver resolver : resolvers) {
- ELResolution resolution = resolver.resolve(context, operand, selection.getOffset());
-
- if(resolution == null)
- continue;
-
- List<ELSegment> segments = resolution.getSegments();
-
- for(ELSegment segment : segments){
- if(!segment.isResolved())
- break;
-
- if(selection.getOffset() <= reference.getStartPosition()+segment.getSourceReference().getStartPosition() &&
- selection.getOffset()+selection.getLength() >= reference.getStartPosition()+segment.getSourceReference().getStartPosition()+segment.getSourceReference().getLength() &&
- (segment instanceof MessagePropertyELSegment || segment instanceof JavaMemberELSegment)){
- return segment;
+ ELSegment segment = getSegment(resolvers, context, selection, reference, operand);
+ if(segment != null){
+ return segment;
+ }
+ for(ELObject child : operand.getChildren()){
+ if(child instanceof ELExpression){
+ segment = getSegment(resolvers, context, selection, reference, (ELExpression)child);
+ if(segment != null){
+ return segment;
}
}
-
}
}
return null;
}
+ private ELSegment getSegment(ELResolver[] resolvers, ELContext context, TextSelection selection, ELReference reference, ELExpression operand){
+ for (ELResolver resolver : resolvers) {
+ ELResolution resolution = resolver.resolve(context, operand, selection.getOffset());
+
+ if(resolution == null)
+ continue;
+
+ List<ELSegment> segments = resolution.getSegments();
+
+ for(ELSegment segment : segments){
+ if(!segment.isResolved())
+ break;
+
+ if(segment.getSourceReference().getStartPosition() >= 0 && segment.getSourceReference().getLength() >= 0 &&
+ selection.getOffset() <= reference.getStartPosition()+segment.getSourceReference().getStartPosition() &&
+ selection.getOffset()+selection.getLength() >= reference.getStartPosition()+segment.getSourceReference().getStartPosition()+segment.getSourceReference().getLength() &&
+ (segment instanceof MessagePropertyELSegment || segment instanceof JavaMemberELSegment)){
+ return segment;
+ }
+ }
+
+ }
+ return null;
+ }
+
private static void saveAndBuild(){
if(!JsfUiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().saveAllEditors(true))
return;
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/hello.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/hello.jsp 2012-01-06 20:19:35 UTC (rev 37698)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/hello.jsp 2012-01-06 20:43:13 UTC (rev 37699)
@@ -11,6 +11,7 @@
<body>
<f:view>
<h3>
+ <h:outputText value="#{user.name + Message.hello_message}" />,
<h:outputText value="#{Message.hello_message}" />,
<h:outputText value="#{user.name}" />!
</h3>
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-06 20:19:35 UTC (rev 37698)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/ELVariableRefactoringTest.java 2012-01-06 20:43:13 UTC (rev 37699)
@@ -8,12 +8,16 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.jboss.tools.common.base.test.AbstractRefactorTest;
+import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.jsf.el.refactoring.RenameELVariableProcessor;
import org.jboss.tools.test.util.ProjectImportTestSetup;
public class ELVariableRefactoringTest extends AbstractRefactorTest {
static String projectName = "JSFKickStartOldFormat";
static IProject project;
+
+ private static final String NEW_NAME = "cust";
+ private static final int NAME_LEN = 4;
public ELVariableRefactoringTest(){
super("EL Variable Refactoring Test");
@@ -25,37 +29,47 @@
}
public void testELVariableRename() throws CoreException {
+
ArrayList<TestChangeStructure> list = new ArrayList<TestChangeStructure>();
-
+
+ IFile sourceFile = project.getProject().getFile("/WebContent/pages/hello.jsp");
+
+ String sourceFileContent = FileUtil.getContentFromEditorOrFile(sourceFile);
+
+ int position = sourceFileContent.indexOf("user.name");
+
TestChangeStructure structure = new TestChangeStructure(project.getProject(), "/WebContent/pages/hello.jsp");
- TestTextChange change = new TestTextChange(349, 8, "customer");
+ TestTextChange change = new TestTextChange(position, NAME_LEN, NEW_NAME);
structure.addTextChange(change);
+
+ position = sourceFileContent.indexOf("user.name", position+1);
+
+ change = new TestTextChange(position, NAME_LEN, NEW_NAME);
+ structure.addTextChange(change);
list.add(structure);
structure = new TestChangeStructure(project, "/WebContent/WEB-INF/faces-config.xml");
- change = new TestTextChange(1815, 8, "customer");
+ change = new TestTextChange(1815, NAME_LEN, NEW_NAME);
structure.addTextChange(change);
list.add(structure);
structure = new TestChangeStructure(project, "/WebContent/pages/inputUserName.jsp");
- change = new TestTextChange(494, 8, "customer");
+ change = new TestTextChange(494, NAME_LEN, NEW_NAME);
structure.addTextChange(change);
list.add(structure);
structure = new TestChangeStructure(project, "/WebContent/pages/el.jsp");
- change = new TestTextChange(83, 8, "customer");
+ change = new TestTextChange(83, NAME_LEN, NEW_NAME);
structure.addTextChange(change);
list.add(structure);
structure = new TestChangeStructure(project, "/WebContent/testElRevalidation.xhtml");
- change = new TestTextChange(601, 8, "customer");
+ change = new TestTextChange(601, NAME_LEN, NEW_NAME);
structure.addTextChange(change);
list.add(structure);
- IFile sourceFile = project.getProject().getFile("/WebContent/pages/hello.jsp");
-
RenameELVariableProcessor processor = new RenameELVariableProcessor(sourceFile, "user");
- processor.setNewName("customer");
+ processor.setNewName(NEW_NAME);
checkRename(processor, list);
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/MessagePropertyRefactoringTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/MessagePropertyRefactoringTest.java 2012-01-06 20:19:35 UTC (rev 37698)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/MessagePropertyRefactoringTest.java 2012-01-06 20:43:13 UTC (rev 37699)
@@ -18,6 +18,9 @@
static String projectName = "JSFKickStartOldFormat";
static IProject project;
+ private static final String NEW_NAME = "good______bye";
+ private static final int NAME_LEN = 13;
+
public MessagePropertyRefactoringTest(){
super("Resource Bundle Message Refactoring Test");
}
@@ -35,16 +38,23 @@
String sourceFileContent = FileUtil.getContentFromEditorOrFile(sourceFile);
int position = sourceFileContent.indexOf("Message.hello_message");
+ position += 8;
TestChangeStructure structure = new TestChangeStructure(project.getProject(), "/WebContent/pages/hello.jsp");
- TestTextChange change = new TestTextChange(position+8, 8, "good_bye");
+ TestTextChange change = new TestTextChange(position, NAME_LEN, NEW_NAME);
structure.addTextChange(change);
+
+ position = sourceFileContent.indexOf("Message.hello_message", position);
+ position += 8;
+
+ change = new TestTextChange(position, NAME_LEN, NEW_NAME);
+ structure.addTextChange(change);
list.add(structure);
IFile propertyFile = project.getProject().getFile("/JavaSource/demo/Messages.properties");
structure = new TestChangeStructure(project.getProject(), "/JavaSource/demo/Messages.properties");
- change = new TestTextChange(0, 8, "good_bye");
+ change = new TestTextChange(0, NAME_LEN, NEW_NAME);
structure.addTextChange(change);
list.add(structure);
@@ -53,7 +63,7 @@
segment.setBaseName("demo.Messages");
segment.setMessagePropertySourceReference(0,10);
RenameMessagePropertyProcessor processor = new RenameMessagePropertyProcessor(sourceFile, segment);
- processor.setNewName("good_bye");
+ processor.setNewName(NEW_NAME);
checkRename(processor, list);
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java 2012-01-06 20:19:35 UTC (rev 37698)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java 2012-01-06 20:43:13 UTC (rev 37699)
@@ -32,6 +32,7 @@
import org.jboss.tools.common.el.core.model.ELExpression;
import org.jboss.tools.common.el.core.model.ELInvocationExpression;
import org.jboss.tools.common.el.core.model.ELMethodInvocation;
+import org.jboss.tools.common.el.core.model.ELObject;
import org.jboss.tools.common.el.core.model.ELPropertyInvocation;
import org.jboss.tools.common.el.core.resolver.ELCompletionEngine;
import org.jboss.tools.common.el.core.resolver.ELContext;
@@ -267,6 +268,29 @@
return true;
}
+ private void resolveByResolvers(ELExpression operand, ELResolver[] resolvers, ELContext context, IRelevanceCheck[] checks, int offset, List<MatchArea> areas, IFile file){
+ for (int i = 0; i < resolvers.length; i++) {
+ ELResolver resolver = resolvers[i];
+ if (!(resolver instanceof ELCompletionEngine) || !checks[i].isRelevant(operand.getText()))
+ continue;
+
+ ELResolution resolution = resolver.resolve(context, operand, offset);
+
+ if(resolution != null) {
+ List<ELSegment> segments = resolution.findSegmentsByJavaElement(javaElement);
+ for(ELSegment segment : segments){
+ int o = offset+segment.getSourceReference().getStartPosition();
+ int l = segment.getSourceReference().getLength();
+
+ if(!contains(areas, o, l)){
+ match(file, o, l);
+ areas.add(new MatchArea(o, l));
+ }
+ }
+ }
+ }
+ }
+
protected void searchInCach(IFile file){
ELResolver[] resolvers = ELResolverFactoryManager.getInstance().getResolvers(file);
@@ -284,24 +308,11 @@
for(ELReference reference : references){
int offset = reference.getStartPosition();
for(ELExpression operand : reference.getEl()){
- for (int i = 0; i < resolvers.length; i++) {
- ELResolver resolver = resolvers[i];
- if (!(resolver instanceof ELCompletionEngine) || !checks[i].isRelevant(operand.getText()))
- continue;
-
- ELResolution resolution = resolver.resolve(context, operand, offset);
-
- if(resolution != null) {
- List<ELSegment> segments = resolution.findSegmentsByJavaElement(javaElement);
- for(ELSegment segment : segments){
- int o = offset+segment.getSourceReference().getStartPosition();
- int l = segment.getSourceReference().getLength();
-
- if(!contains(areas, o, l)){
- match(file, o, l);
- areas.add(new MatchArea(o, l));
- }
- }
+ resolveByResolvers(operand, resolvers, context, checks, offset, areas, file);
+
+ for(ELObject child : operand.getChildren()){
+ if(child instanceof ELExpression){
+ resolveByResolvers((ELExpression)child, resolvers, context, checks, offset, areas, file);
}
}
}
@@ -317,6 +328,14 @@
checkMatch(file, expression, offset+getOffset(expression), getLength(expression));
}
}
+ for(ELObject child : operand.getChildren()){
+ if(child instanceof ELInvocationExpression){
+ ELInvocationExpression expression = findComponentReference((ELInvocationExpression)child);
+ if(expression != null){
+ checkMatch(file, expression, offset+getOffset(expression), getLength(expression));
+ }
+ }
+ }
}
}
}
12 years, 11 months
JBoss Tools SVN: r37697 - trunk/cdi/plugins/org.jboss.tools.cdi.ui.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-01-06 15:02:08 -0500 (Fri, 06 Jan 2012)
New Revision: 37697
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml
Log:
https://issues.jboss.org/browse/JBIDE-8464 Ensure that the Seam Project wizard opens the Seam perspective with the Web Development perspective as preferred
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml 2012-01-06 19:51:05 UTC (rev 37696)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml 2012-01-06 20:02:08 UTC (rev 37697)
@@ -222,6 +222,7 @@
id="org.jboss.tools.cdi.ui.wizard.NewCDIProjectWizard"
name="CDI Web Project"
preferredPerspectives="org.jboss.tools.common.ui.JBossPerspective,org.eclipse.jst.j2ee.J2EEPerspective,org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"
+ finalPerspective="org.jboss.tools.common.ui.JBossPerspective"
project="true">
<description>
Create a CDI Web Project
12 years, 11 months
JBoss Tools SVN: r37696 - trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-01-06 14:51:05 -0500 (Fri, 06 Jan 2012)
New Revision: 37696
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/CDIProjectWizard.java
Log:
https://issues.jboss.org/browse/JBIDE-8464 Ensure that the Seam Project wizard opens the Seam perspective with the Web Development perspective as preferred
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/CDIProjectWizard.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/CDIProjectWizard.java 2012-01-06 19:49:53 UTC (rev 37695)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/CDIProjectWizard.java 2012-01-06 19:51:05 UTC (rev 37696)
@@ -15,6 +15,7 @@
import java.util.Set;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IExecutableExtension;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jst.servlet.ui.project.facet.WebProjectFirstPage;
@@ -35,7 +36,7 @@
/**
* @author Alexey Kazakov
*/
-public class CDIProjectWizard extends WebProjectWizard {
+public class CDIProjectWizard extends WebProjectWizard implements IExecutableExtension {
private static final String CDI_TEMPALTE = "template.jboss.tools.cdi10";
private IPreset oldPreset;
@@ -113,6 +114,15 @@
return CDIImages.getImageDescriptor(CDIImages.WELD_WIZARD_IMAGE_PATH);
}
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jst.servlet.ui.project.facet.WebProjectWizard#getFinalPerspectiveID()
+ */
+ @Override
+ protected String getFinalPerspectiveID() {
+ return null;
+ }
+
class FirstPage extends WebProjectFirstPage {
public FirstPage(IDataModel model, String pageName) {
12 years, 12 months
JBoss Tools SVN: r37695 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-01-06 14:49:53 -0500 (Fri, 06 Jan 2012)
New Revision: 37695
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java
Log:
https://issues.jboss.org/browse/JBIDE-8464 Ensure that the Seam Project wizard opens the Seam perspective with the Web Development perspective as preferred
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java 2012-01-06 19:32:02 UTC (rev 37694)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java 2012-01-06 19:49:53 UTC (rev 37695)
@@ -26,13 +26,12 @@
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IExecutableExtension;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jdt.core.IClasspathContainer;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
@@ -100,7 +99,7 @@
*
*/
@SuppressWarnings("restriction")
-public class SeamProjectWizard extends WebProjectWizard {
+public class SeamProjectWizard extends WebProjectWizard implements IExecutableExtension {
private SeamWebProjectFirstPage firstPage;
private String seamConfigTemplate;
@@ -285,9 +284,13 @@
return null;
}
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jst.servlet.ui.project.facet.WebProjectWizard#getFinalPerspectiveID()
+ */
@Override
protected String getFinalPerspectiveID() {
- return "org.jboss.tools.seam.ui.SeamPerspective"; //$NON-NLS-1$
+ return null;
}
protected IFacetedProjectTemplate getTemplate() {
12 years, 12 months
JBoss Tools SVN: r37694 - in trunk/examples/tests/org.jboss.tools.project.examples.test: src/org/jboss/tools/project/examples/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-01-06 14:32:02 -0500 (Fri, 06 Jan 2012)
New Revision: 37694
Modified:
trunk/examples/tests/org.jboss.tools.project.examples.test/.project
trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectTest.java
Log:
JBIDE-10602 Project Examples tests fail
Modified: trunk/examples/tests/org.jboss.tools.project.examples.test/.project
===================================================================
--- trunk/examples/tests/org.jboss.tools.project.examples.test/.project 2012-01-06 19:30:05 UTC (rev 37693)
+++ trunk/examples/tests/org.jboss.tools.project.examples.test/.project 2012-01-06 19:32:02 UTC (rev 37694)
@@ -31,16 +31,4 @@
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
</natures>
- <linkedResources>
- <link>
- <name>lib-org.jboss.tools.jst.web.kb_3.3.0.v20111001-0515-H542-M4</name>
- <type>2</type>
- <location>E:/eclipse-3.7.1/plugins/org.jboss.tools.jst.web.kb_3.3.0.v20111001-0515-H542-M4</location>
- </link>
- <link>
- <name>lib-org.jboss.tools.jst.web_3.3.0.v20111001-0515-H542-M4</name>
- <type>2</type>
- <location>E:/eclipse-3.7.1/plugins/org.jboss.tools.jst.web_3.3.0.v20111001-0515-H542-M4</location>
- </link>
- </linkedResources>
</projectDescription>
Modified: trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectTest.java
===================================================================
--- trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectTest.java 2012-01-06 19:30:05 UTC (rev 37693)
+++ trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectTest.java 2012-01-06 19:32:02 UTC (rev 37694)
@@ -14,7 +14,6 @@
import static org.junit.Assert.assertTrue;
import java.io.File;
-import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -33,13 +32,11 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.resources.WorkspaceJob;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
-import org.eclipse.ui.PlatformUI;
import org.jboss.tools.project.examples.Messages;
import org.jboss.tools.project.examples.ProjectExamplesActivator;
import org.jboss.tools.project.examples.model.Category;
@@ -48,7 +45,6 @@
import org.jboss.tools.project.examples.model.Project;
import org.jboss.tools.project.examples.model.ProjectExampleSite;
import org.jboss.tools.project.examples.model.ProjectUtil;
-import org.jboss.tools.project.examples.wizard.NewProjectExamplesWizard;
import org.jboss.tools.test.util.JobUtils;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -214,6 +210,12 @@
for (int i = 0; i < projectMarkers.length; i++) {
if (projectMarkers[i].getAttribute(IMarker.SEVERITY,
IMarker.SEVERITY_ERROR) == IMarker.SEVERITY_ERROR) {
+ String message = projectMarkers[i].getAttribute(IMarker.MESSAGE, null);
+ String location = projectMarkers[i].getAttribute(IMarker.LOCATION, null);
+ String lineNumber = projectMarkers[i].getAttribute(IMarker.LINE_NUMBER, null);
+ String type = projectMarkers[i].getType();
+ System.out.println("projectName=" + projectName);
+ System.out.println("marker: type=" + type + ",message=" + message + ",location=" + location + ",line=" + lineNumber);
markers.add(projectMarkers[i]);
}
}
12 years, 12 months
JBoss Tools SVN: r37693 - in trunk/cdi/tests/org.jboss.tools.cdi.core.test: resources/tck/tests/jbt and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-06 14:30:05 -0500 (Fri, 06 Jan 2012)
New Revision: 37693
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/excluded/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/excluded/MyExcludedBean.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/excluded2/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/excluded2/MyExcludedBean2.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/excluded2/MyIncludedBean.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResourceExclusionTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
Log:
JBIDE-10601
https://issues.joss.org/browse/JBIDE-10601
Method EclipseUtil.getCompilationUnit(IFile) should return existing Java element or null. Test is added.
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/.classpath 2012-01-06 19:27:44 UTC (rev 37692)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/.classpath 2012-01-06 19:30:05 UTC (rev 37693)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="JavaSource"/>
+ <classpathentry excluding="**/excluded/**|**/excluded2/MyExcludedBean2.java" kind="src" path="JavaSource"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss 4.2 Runtime">
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/excluded/MyExcludedBean.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/excluded/MyExcludedBean.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/excluded/MyExcludedBean.java 2012-01-06 19:30:05 UTC (rev 37693)
@@ -0,0 +1,18 @@
+package org.jboss.jsr299.tck.tests.jbt.excluded;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import javax.inject.Named;
+
+@Named("myExcludedBean")
+class MyExcludedBean {
+ private int value = 0;
+
+ public int getValue() {
+ return value;
+ }
+
+ public void setValue(int value) {
+ this.value = value;
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/excluded/MyExcludedBean.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/excluded2/MyExcludedBean2.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/excluded2/MyExcludedBean2.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/excluded2/MyExcludedBean2.java 2012-01-06 19:30:05 UTC (rev 37693)
@@ -0,0 +1,18 @@
+package org.jboss.jsr299.tck.tests.jbt.excluded2;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import javax.inject.Named;
+
+@Named("myExcludedBean2")
+class MyExcludedBean2 {
+ private int value = 0;
+
+ public int getValue() {
+ return value;
+ }
+
+ public void setValue(int value) {
+ this.value = value;
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/excluded2/MyExcludedBean2.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/excluded2/MyIncludedBean.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/excluded2/MyIncludedBean.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/excluded2/MyIncludedBean.java 2012-01-06 19:30:05 UTC (rev 37693)
@@ -0,0 +1,18 @@
+package org.jboss.jsr299.tck.tests.jbt.excluded2;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import javax.inject.Named;
+
+@Named("myIncludedBean")
+class MyIncludedBean {
+ private int value = 0;
+
+ public int getValue() {
+ return value;
+ }
+
+ public void setValue(int value) {
+ this.value = value;
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/excluded2/MyIncludedBean.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2012-01-06 19:27:44 UTC (rev 37692)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2012-01-06 19:30:05 UTC (rev 37693)
@@ -43,6 +43,7 @@
import org.jboss.tools.cdi.core.test.tck.QualifierDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.QualifierWithMembersTest;
import org.jboss.tools.cdi.core.test.tck.ResolvedTypesCacheTest;
+import org.jboss.tools.cdi.core.test.tck.ResourceExclusionTest;
import org.jboss.tools.cdi.core.test.tck.ScopeDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.SelectedAlternativeTest;
import org.jboss.tools.cdi.core.test.tck.StereotypeDefinitionTest;
@@ -118,6 +119,7 @@
suite.addTestSuite(ResolvedTypesCacheTest.class);
suite.addTestSuite(CDIUtilTest.class);
suite.addTestSuite(CoreTest.class);
+ suite.addTestSuite(ResourceExclusionTest.class);
// Validation tests
suite.addTestSuite(DefenitionErrorsValidationTest.class);
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResourceExclusionTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResourceExclusionTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResourceExclusionTest.java 2012-01-06 19:30:05 UTC (rev 37693)
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.cdi.core.test.tck;
+
+import java.util.Set;
+
+import org.eclipse.jdt.core.JavaModelException;
+import org.jboss.tools.cdi.core.IBean;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class ResourceExclusionTest extends TCKTest {
+
+ public void testExclusion() throws JavaModelException {
+ Set<IBean> beans = cdiProject.getBeans("myExcludedBean", false);
+ assertEquals("Wrong number of beans.", 0, beans.size());
+
+ beans = cdiProject.getBeans("myExcludedBean2", false);
+ assertEquals("Wrong number of beans.", 0, beans.size());
+
+ beans = cdiProject.getBeans("myIncludedBean", false);
+ assertEquals("Wrong number of beans.", 1, beans.size());
+
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResourceExclusionTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
12 years, 12 months
JBoss Tools SVN: r37692 - trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-06 14:27:44 -0500 (Fri, 06 Jan 2012)
New Revision: 37692
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/EclipseUtil.java
Log:
JBIDE-10601
https://issues.joss.org/browse/JBIDE-10601
Method EclipseUtil.getCompilationUnit(IFile) should return existing Java element or null.
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/EclipseUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/EclipseUtil.java 2012-01-06 19:24:35 UTC (rev 37691)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/EclipseUtil.java 2012-01-06 19:27:44 UTC (rev 37692)
@@ -25,7 +25,9 @@
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.internal.core.JavaModelManager;
/**
* @author Alexey Kazakov, Viacheslav Kabanovich
@@ -75,11 +77,23 @@
}
return resources.toArray(new IResource[resources.size()]);
}
-
- public static ICompilationUnit getCompilationUnit(IFile f) throws CoreException {
- IJavaElement element= JavaCore.create(f);
- if (element instanceof ICompilationUnit)
- return (ICompilationUnit) element;
+
+ /**
+ * Returns compilation unit for file, if it exists in Java model, otherwise returns null.
+ *
+ * @param f
+ * @return compilation unit for file, if it exists in Java model, otherwise null
+ * @throws CoreException
+ */
+ public static ICompilationUnit getCompilationUnit(IFile f) {
+ IJavaProject jp = getJavaProject(f.getProject());
+ if(jp != null) {
+ IPackageFragment pkg = (IPackageFragment)JavaModelManager.determineIfOnClasspath(f, jp);
+ if(pkg != null) {
+ ICompilationUnit result = pkg.getCompilationUnit(f.getName());
+ return (result.exists()) ? result : null;
+ }
+ }
return null;
}
12 years, 12 months