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 30728 Details for
Bug 89474
[polish] Installed JRE pref page: Modify multiple attributes at once
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Removes Edit button, adds two new buttons
patch.txt (text/plain), 8.95 KB, created by
Gary Barbon
on 2005-11-28 16:06:54 EST
(
hide
)
Description:
Removes Edit button, adds two new buttons
Filename:
MIME Type:
Creator:
Gary Barbon
Created:
2005-11-28 16:06:54 EST
Size:
8.95 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.debug.ui >Index: ui/org/eclipse/jdt/internal/debug/ui/jres/JREMessages.properties >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREMessages.properties,v >retrieving revision 1.26 >diff -u -r1.26 JREMessages.properties >--- ui/org/eclipse/jdt/internal/debug/ui/jres/JREMessages.properties 2 Aug 2005 22:25:36 -0000 1.26 >+++ ui/org/eclipse/jdt/internal/debug/ui/jres/JREMessages.properties 28 Nov 2005 21:06:02 -0000 >@@ -68,6 +68,9 @@ > VMLibraryBlock_0=Source attachment: > VMLibraryBlock_1=(none) > VMLibraryBlock_10=Jar Selection >+VMLibraryBlock_11=Source Attachment... >+VMLibraryBlock_12=Javadoc Location... >+VMLibraryBlock_13=multiple entries > VMLibraryBlock_2=Javadoc location: > VMLibraryBlock_4=U&p > VMLibraryBlock_5=&Down >Index: ui/org/eclipse/jdt/internal/debug/ui/jres/JREMessages.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREMessages.java,v >retrieving revision 1.8 >diff -u -r1.8 JREMessages.java >--- ui/org/eclipse/jdt/internal/debug/ui/jres/JREMessages.java 2 Aug 2005 22:25:36 -0000 1.8 >+++ ui/org/eclipse/jdt/internal/debug/ui/jres/JREMessages.java 28 Nov 2005 21:06:02 -0000 >@@ -87,4 +87,10 @@ > public static String VMLibraryBlock_9; > > public static String VMLibraryBlock_10; >+ >+ public static String VMLibraryBlock_11; >+ >+ public static String VMLibraryBlock_12; >+ >+ public static String VMLibraryBlock_13; > } >\ No newline at end of file >Index: ui/org/eclipse/jdt/internal/debug/ui/jres/VMLibraryBlock.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMLibraryBlock.java,v >retrieving revision 1.21 >diff -u -r1.21 VMLibraryBlock.java >--- ui/org/eclipse/jdt/internal/debug/ui/jres/VMLibraryBlock.java 1 Nov 2005 15:14:44 -0000 1.21 >+++ ui/org/eclipse/jdt/internal/debug/ui/jres/VMLibraryBlock.java 28 Nov 2005 21:06:02 -0000 >@@ -13,9 +13,11 @@ > > import java.io.File; > import java.net.URL; >+import java.util.ArrayList; > import java.util.HashMap; > import java.util.HashSet; > import java.util.Iterator; >+import java.util.List; > import java.util.Set; > > import org.eclipse.core.runtime.IPath; >@@ -380,7 +382,8 @@ > private Button fDownButton; > private Button fRemoveButton; > private Button fAddButton; >- private Button fEditButton; >+ private Button fSourceAttachment; >+ private Button fJavadocLocation; > > /** > * Constructor for VMLibraryBlock. >@@ -428,15 +431,24 @@ > fAddButton= createPushButton(pathButtonComp, JREMessages.VMLibraryBlock_7); > fAddButton.addSelectionListener(this); > >- fEditButton= createPushButton(pathButtonComp, JREMessages.VMLibraryBlock_8); >- fEditButton.addSelectionListener(this); >+ fSourceAttachment = createPushButton(pathButtonComp, JREMessages.VMLibraryBlock_11); >+ fSourceAttachment.addSelectionListener(this); >+ fJavadocLocation = createPushButton(pathButtonComp, JREMessages.VMLibraryBlock_12); >+ fJavadocLocation.addSelectionListener(this); >+ > fLibraryViewer.addDoubleClickListener(new IDoubleClickListener() { > /* (non-Javadoc) > * @see org.eclipse.jface.viewers.IDoubleClickListener#doubleClick(org.eclipse.jface.viewers.DoubleClickEvent) > */ > public void doubleClick(DoubleClickEvent event) { >- if (fEditButton.isEnabled()) { >- edit((IStructuredSelection) fLibraryViewer.getSelection()); >+ if (event.getSource() == fSourceAttachment) { >+ if(fSourceAttachment.isEnabled()){ >+ editSourceLocation((IStructuredSelection) fLibraryViewer.getSelection()); >+ } >+ } else if (event.getSource()== fJavadocLocation) { >+ if(fJavadocLocation.isEnabled()){ >+ editJavadoc((IStructuredSelection) fLibraryViewer.getSelection()); >+ } > } > } > }); >@@ -626,8 +638,10 @@ > fLibraryContentProvider.remove((IStructuredSelection) fLibraryViewer.getSelection()); > } else if (source == fAddButton) { > add((IStructuredSelection) fLibraryViewer.getSelection()); >- } else if (source == fEditButton) { >- edit((IStructuredSelection) fLibraryViewer.getSelection()); >+ } else if (source == fSourceAttachment) { >+ editSourceLocation((IStructuredSelection) fLibraryViewer.getSelection()); >+ } else if (source == fJavadocLocation) { >+ editJavadoc((IStructuredSelection) fLibraryViewer.getSelection()); > } else if (source == fDefaultButton) { > restoreDefaultLibraries(); > } >@@ -671,25 +685,66 @@ > } > > /** >- * Open the javadoc location dialog or the source location dialog, and set the result >- * to the selected libraries. >+ * Opens the configure javadoc attachement dialog, and changes the source >+ * attachement path of all library entries in the given selection to the >+ * path chosen in the dialog. >+ * @param selection the selection containing library entries to change. >+ * @since 3.2 > */ >- private void edit(IStructuredSelection selection) { >- SubElement firstElement= (SubElement)selection.getFirstElement(); >- LibraryLocation library= firstElement.getParent(); >- if (firstElement.getType() == SubElement.JAVADOC_URL) { >- URL[] urls= BuildPathDialogAccess.configureJavadocLocation(fLibraryViewer.getControl().getShell(), library.getSystemLibraryPath().toOSString(), library.getJavadocLocation()); >- if (urls != null) { >- fLibraryContentProvider.setJavadoc(urls[0], selection); >- } >- } else { >- IRuntimeClasspathEntry entry= JavaRuntime.newArchiveRuntimeClasspathEntry(library.getSystemLibraryPath()); >- entry.setSourceAttachmentPath(library.getSystemLibrarySourcePath()); >- entry.setSourceAttachmentRootPath(library.getPackageRootPath()); >- IClasspathEntry classpathEntry = BuildPathDialogAccess.configureSourceAttachment(fLibraryViewer.getControl().getShell(), entry.getClasspathEntry()); >- if (classpathEntry != null) { >- fLibraryContentProvider.setSourcePath(classpathEntry.getSourceAttachmentPath(), classpathEntry.getSourceAttachmentRootPath(), selection); >+ private void editJavadoc(IStructuredSelection selection){ >+ Object[] selections = selection.toArray(); >+ LibraryLocation firstElement=null; >+ String pathName; >+ >+ //get the customized display name >+ if(selections.length>1){ >+ pathName = JREMessages.VMLibraryBlock_13; >+ } >+ else{ >+ if(selections[0] instanceof SubElement >+ && ((SubElement)selections[0]).getType() == SubElement.JAVADOC_URL){ >+ firstElement = ((SubElement)selections[0]).getParent(); > } >+ else >+ firstElement = (LibraryLocation)selections[0]; >+ pathName = firstElement.getSystemLibraryPath().toOSString(); >+ } >+ >+ //get the new url & add it to all libraries in selection. >+ URL[] urls= BuildPathDialogAccess. >+ configureJavadocLocation(fLibraryViewer.getControl().getShell(), >+ pathName, selections.length>1?null:firstElement.getJavadocLocation()); >+ if (urls != null) { >+ fLibraryContentProvider.setJavadoc(urls[0], selection); >+ } >+ >+ } >+ >+ /** >+ * Opens the configure source attachement dialog, and changes the source >+ * attachement path of all library entries in the given selection to the >+ * path chosen in the dialog. >+ * @param selection the selection containing library entries to change. >+ * @since 3.2 >+ */ >+ private void editSourceLocation(IStructuredSelection selection){ >+ Object elem = selection.getFirstElement(); >+ LibraryLocation library = null; >+ if(elem instanceof SubElement){ >+ SubElement firstElement= (SubElement)elem; >+ library= firstElement.getParent(); >+ } >+ else{ >+ library= (LibraryLocation)elem; >+ } >+ >+ IRuntimeClasspathEntry entry= JavaRuntime.newArchiveRuntimeClasspathEntry(library.getSystemLibraryPath()); >+ entry.setSourceAttachmentPath(library.getSystemLibrarySourcePath()); >+ entry.setSourceAttachmentRootPath(library.getPackageRootPath()); >+ IClasspathEntry classpathEntry = BuildPathDialogAccess.configureSourceAttachment(fLibraryViewer.getControl().getShell(), entry.getClasspathEntry()); >+ //NOTE: we cannot customize the path display due to ClasspathEntry restrictions >+ if (classpathEntry != null) { >+ fLibraryContentProvider.setSourcePath(classpathEntry.getSourceAttachmentPath(), classpathEntry.getSourceAttachmentRootPath(), selection); > } > } > >@@ -722,7 +777,6 @@ > LibraryLocation lib; > if (element instanceof LibraryLocation) { > lib= (LibraryLocation)element; >- allSource= allJavadoc= false; > } else { > SubElement subElement= (SubElement)element; > lib= (subElement).getParent(); >@@ -742,6 +796,7 @@ > } > fUpButton.setEnabled(enableUp); > fDownButton.setEnabled(enableDown); >- fEditButton.setEnabled(!selection.isEmpty() && (allSource || allJavadoc)); >+ fJavadocLocation.setEnabled(!selection.isEmpty() && allJavadoc); >+ fSourceAttachment.setEnabled(!selection.isEmpty() && allSource); > } > }
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 89474
:
30727
|
30728
|
36675