Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 255984 Details for
Bug 461083
[target] Target definition editor prematurely allows editing of a Software Site
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Fix
461083_fix.patch (text/plain), 4.29 KB, created by
Vikas Chandra
on 2015-08-20 06:59:11 EDT
(
hide
)
Description:
Fix
Filename:
MIME Type:
Creator:
Vikas Chandra
Created:
2015-08-20 06:59:11 EDT
Size:
4.29 KB
patch
obsolete
>diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/TargetEditor.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/TargetEditor.java >index 24fdd68..b442889 100644 >--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/TargetEditor.java >+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/TargetEditor.java >@@ -11,7 +11,8 @@ > package org.eclipse.pde.internal.ui.editor.targetdefinition; > > import java.io.File; >-import java.util.*; >+import java.util.ArrayList; >+import java.util.Iterator; > import java.util.List; > import org.eclipse.core.resources.*; > import org.eclipse.core.runtime.*; >@@ -458,7 +459,27 @@ > Job resolveJob = new Job(PDEUIMessages.TargetEditor_1) { > @Override > protected IStatus run(IProgressMonitor monitor) { >+ Display.getDefault().syncExec(new Runnable() { >+ @Override >+ public void run() { >+ if (fLocationTree != null) >+ fLocationTree.setTargetResolving(true); >+ >+ } >+ }); >+ try { > getTarget().resolve(monitor); >+ } catch (Exception e) { >+ } finally { >+ Display.getDefault().syncExec(new Runnable() { >+ @Override >+ public void run() { >+ if (fLocationTree != null) >+ fLocationTree.setTargetResolving(false); >+ >+ } >+ }); >+ } > if (monitor.isCanceled()) { > return Status.CANCEL_STATUS; > } >diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetLocationsGroup.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetLocationsGroup.java >index 7c7b0c2..300fa6f 100644 >--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetLocationsGroup.java >+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetLocationsGroup.java >@@ -52,11 +52,12 @@ > > private TreeViewer fTreeViewer; > private Button fAddButton; >- private Button fEditButton; >+ public Button fEditButton; > private Button fRemoveButton; > private Button fUpdateButton; > private Button fReloadButton; > private Button fShowContentButton; >+ private boolean isTargetResolving = false; > > private ITargetDefinition fTarget; > private ListenerList fChangeListeners = new ListenerList(); >@@ -324,7 +325,7 @@ > Object currentSelection = iterator.next(); > if (currentSelection instanceof ITargetLocation) { > ITargetLocation location = (ITargetLocation) currentSelection; >- ITargetLocationEditor editor = (ITargetLocationEditor) Platform.getAdapterManager().getAdapter(location, ITargetLocationEditor.class); >+ ITargetLocationEditor editor = Platform.getAdapterManager().getAdapter(location, ITargetLocationEditor.class); > if (editor != null) { > if (editor.canEdit(fTarget, location)) { > IWizard editWizard = editor.getEditWizard(fTarget, location); >@@ -510,7 +511,7 @@ > canRemove = true; > if (!canEdit) { > ITargetLocation location = (ITargetLocation) currentSelection; >- ITargetLocationEditor editor = (ITargetLocationEditor) Platform.getAdapterManager().getAdapter(location, ITargetLocationEditor.class); >+ ITargetLocationEditor editor = Platform.getAdapterManager().getAdapter(location, ITargetLocationEditor.class); > if (editor != null) { > canEdit = editor.canEdit(fTarget, location); > } >@@ -521,7 +522,7 @@ > } > if (!canUpdate) { > ITargetLocation location = (ITargetLocation) currentSelection; >- ITargetLocationUpdater updater = (ITargetLocationUpdater) Platform.getAdapterManager().getAdapter(location, ITargetLocationUpdater.class); >+ ITargetLocationUpdater updater = Platform.getAdapterManager().getAdapter(location, ITargetLocationUpdater.class); > if (updater != null) { > canUpdate = updater.canUpdate(fTarget, location); > } >@@ -539,7 +540,7 @@ > > } > fRemoveButton.setEnabled(canRemove); >- fEditButton.setEnabled(canEdit); >+ fEditButton.setEnabled(canEdit && !isTargetResolving()); > fUpdateButton.setEnabled(canUpdate); > > // TODO Some code to find the parent location of items in the tree >@@ -589,4 +590,12 @@ > } > } > >+ public boolean isTargetResolving() { >+ return isTargetResolving; >+ } >+ >+ public void setTargetResolving(boolean isTargetResolving) { >+ this.isTargetResolving = isTargetResolving; >+ } >+ > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 461083
:
255984
|
256004