From 05e7378a1ebfeacb2c2f2c7d837b73b13a9a1fad Mon Sep 17 00:00:00 2001 From: dmitrygusev Date: Fri, 30 Aug 2013 14:15:38 +0400 Subject: [PATCH] Version 1.0.2 * Fallback only if no files were found from selection * Fix for determining project's source folders --- com.anjlab.eclipse.tapestry5.feature/feature.xml | 2 +- com.anjlab.eclipse.tapestry5/META-INF/MANIFEST.MF | 2 +- .../anjlab/eclipse/tapestry5/handlers/SwitchHandler.java | 6 +++++- update-site/site.xml | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/com.anjlab.eclipse.tapestry5.feature/feature.xml b/com.anjlab.eclipse.tapestry5.feature/feature.xml index 6940f9c..b5acddb 100644 --- a/com.anjlab.eclipse.tapestry5.feature/feature.xml +++ b/com.anjlab.eclipse.tapestry5.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/com.anjlab.eclipse.tapestry5/META-INF/MANIFEST.MF b/com.anjlab.eclipse.tapestry5/META-INF/MANIFEST.MF index fcfb866..7ef79ef 100644 --- a/com.anjlab.eclipse.tapestry5/META-INF/MANIFEST.MF +++ b/com.anjlab.eclipse.tapestry5/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Eclipse Integration for Tapestry5 Bundle-SymbolicName: com.anjlab.eclipse.tapestry5;singleton:=true -Bundle-Version: 1.0.1 +Bundle-Version: 1.0.2 Bundle-Activator: com.anjlab.eclipse.tapestry5.Activator Bundle-Vendor: AnjLab Team Require-Bundle: org.eclipse.ui, diff --git a/com.anjlab.eclipse.tapestry5/src/com/anjlab/eclipse/tapestry5/handlers/SwitchHandler.java b/com.anjlab.eclipse.tapestry5/src/com/anjlab/eclipse/tapestry5/handlers/SwitchHandler.java index 6c7d0a0..60854a0 100644 --- a/com.anjlab.eclipse.tapestry5/src/com/anjlab/eclipse/tapestry5/handlers/SwitchHandler.java +++ b/com.anjlab.eclipse.tapestry5/src/com/anjlab/eclipse/tapestry5/handlers/SwitchHandler.java @@ -67,6 +67,8 @@ public Object execute(ExecutionEvent event) throws ExecutionException if (file != null) { openComplementFile(window, file); + + return null; } } catch (JavaModelException e) @@ -250,7 +252,9 @@ private boolean isSourceFolder(IContainer container) throws JavaModelException private boolean isSourceFolder(IJavaElement javaElement) throws JavaModelException { - return javaElement != null && (javaElement instanceof IPackageFragmentRoot); + return javaElement != null + && (javaElement instanceof IPackageFragmentRoot) + && (((IPackageFragmentRoot) javaElement).getKind() == IPackageFragmentRoot.K_SOURCE); } private String getComplementFileName(String fileName, String originalExtension) diff --git a/update-site/site.xml b/update-site/site.xml index b9a2771..b4846bd 100644 --- a/update-site/site.xml +++ b/update-site/site.xml @@ -1,6 +1,6 @@ - +