Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/DownloadSourcesActionDelegate.java')
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/DownloadSourcesActionDelegate.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/DownloadSourcesActionDelegate.java b/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/DownloadSourcesActionDelegate.java
index 1b8e6eb9..47fda096 100644
--- a/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/DownloadSourcesActionDelegate.java
+++ b/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/DownloadSourcesActionDelegate.java
@@ -8,6 +8,7 @@
* Contributors:
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
+
package org.eclipse.m2e.jdt.internal;
import org.slf4j.Logger;
@@ -24,10 +25,10 @@ import org.eclipse.ui.IEditorPart;
import org.eclipse.m2e.jdt.IClasspathManager;
import org.eclipse.m2e.jdt.MavenJdtPlugin;
+
/**
- *
* DownloadSourcesActionDelegate
- *
+ *
* @author Anton Kraev
*/
@@ -37,18 +38,18 @@ public class DownloadSourcesActionDelegate implements IEditorActionDelegate {
public void setActiveEditor(IAction action, IEditorPart part) {
- if (part != null) {
+ if(part != null) {
try {
- IClasspathManager buildpathManager = MavenJdtPlugin .getDefault().getBuildpathManager();
+ IClasspathManager buildpathManager = MavenJdtPlugin.getDefault().getBuildpathManager();
IClassFileEditorInput input = (IClassFileEditorInput) part.getEditorInput();
IJavaElement element = input.getClassFile();
- while (element.getParent() != null) {
+ while(element.getParent() != null) {
element = element.getParent();
- if (element instanceof IPackageFragmentRoot) {
+ if(element instanceof IPackageFragmentRoot) {
IPackageFragmentRoot root = (IPackageFragmentRoot) element;
- if (root.getSourceAttachmentPath() != null) {
+ if(root.getSourceAttachmentPath() != null) {
// do nothing if sources attached already
break;
}

Back to the top