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 197492 Details for
Bug 70417
[classpath] Allow JARs in User Libraries to be defined with relative paths to classpath variables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch for eclipse bug 70417
eclipse_70417.patch (text/plain), 15.17 KB, created by
Thomas Reinhardt
on 2011-06-07 08:42:46 EDT
(
hide
)
Description:
Patch for eclipse bug 70417
Filename:
MIME Type:
Creator:
Thomas Reinhardt
Created:
2011-06-07 08:42:46 EDT
Size:
15.17 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui >Index: ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.java,v >retrieving revision 1.143 >diff -u -r1.143 PreferencesMessages.java >--- ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.java 27 Apr 2011 07:51:27 -0000 1.143 >+++ ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.java 7 Jun 2011 11:09:47 -0000 >@@ -621,6 +621,7 @@ > public static String UserLibraryPreferencePage_libraries_new_button; > public static String UserLibraryPreferencePage_libraries_edit_button; > public static String UserLibraryPreferencePage_libraries_addjar_button; >+ public static String UserLibraryPreferencePage_libraries_addexternaljar_button; > public static String UserLibraryPreferencePage_libraries_remove_button; > public static String UserLibraryPreferencePage_libraries_load_button; > public static String UserLibraryPreferencePage_libraries_save_button; >Index: ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.properties,v >retrieving revision 1.529 >diff -u -r1.529 PreferencesMessages.properties >--- ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.properties 15 Apr 2011 14:09:07 -0000 1.529 >+++ ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.properties 7 Jun 2011 11:09:48 -0000 >@@ -14,6 +14,7 @@ > ############################################################################### > > BuildPathsPropertyPage_error_message=An error occurred while setting the build path. >+UserLibraryPreferencePage_libraries_addexternaljar_button=Add E&xternal JARs... > BuildPathsPropertyPage_error_title=Error Setting Build Path > BuildPathsPropertyPage_job_title=Setting build path > BuildPathsPropertyPage_no_java_project_message=Not a Java project. >@@ -173,7 +174,7 @@ > JavaEditorPreferencePage_smartPaste= Adjust &indentation > > # DO NOT TRANSLATE "org.eclipse.ui.preferencePages.GeneralTextEditor" and "org.eclipse.ui.preferencePages.ColorsAndFonts" >-JavaEditorPreferencePage_link=Java editor preferences. See <a href=\"org.eclipse.ui.preferencePages.GeneralTextEditor\">'Text Editors'</a> for general text editor preferences and <a href=\"org.eclipse.ui.preferencePages.ColorsAndFonts\">'Colors and Fonts'</a> to configure the font. >+JavaEditorPreferencePage_link=Java editor preferences. See <a href\="org.eclipse.ui.preferencePages.GeneralTextEditor">'Text Editors'</a> for general text editor preferences and <a href\="org.eclipse.ui.preferencePages.ColorsAndFonts">'Colors and Fonts'</a> to configure the font. > > JavaEditorPreferencePage_importsOnPaste=&Update imports > JavaEditorPreferencePage_subWordNavigation= Smart &caret positioning in Java names (overrides platform behavior) >@@ -185,7 +186,7 @@ > JavaEditorPropertyPage_SaveActionLink_Text=The actions to execute when the Java Editor is saved can be configured on to the <a>'Save Action'</a> property page. > > # DO NOT TRANSLATE "org.eclipse.ui.preferencePages.GeneralTextEditor" and "org.eclipse.ui.preferencePages.ColorsAndFonts" >-JavaEditorColoringConfigurationBlock_link= Default colors and font can be configured on the <a href=\"org.eclipse.ui.preferencePages.GeneralTextEditor\">'Text Editors'</a> and on the <a href=\"org.eclipse.ui.preferencePages.ColorsAndFonts\">'Colors and Fonts'</a> preference page. >+JavaEditorColoringConfigurationBlock_link= Default colors and font can be configured on the <a href\="org.eclipse.ui.preferencePages.GeneralTextEditor">'Text Editors'</a> and on the <a href\="org.eclipse.ui.preferencePages.ColorsAndFonts">'Colors and Fonts'</a> preference page. > > JavaEditorPreferencePage_hoverTab_title= Ho&vers > >@@ -215,7 +216,7 @@ > MarkOccurrencesConfigurationBlock_title= &Mark Occurrences > > # DO NOT TRANSLATE "org.eclipse.ui.editors.preferencePages.Annotations" >-MarkOccurrencesConfigurationBlock_link= The appearance can be configured on the <a href=\"org.eclipse.ui.editors.preferencePages.Annotations\">'Annotations'</a> preference page. >+MarkOccurrencesConfigurationBlock_link= The appearance can be configured on the <a href\="org.eclipse.ui.editors.preferencePages.Annotations">'Annotations'</a> preference page. > > MarkOccurrencesConfigurationBlock_markOccurrences= Mark &occurrences of the selected element in the current file. > MarkOccurrencesConfigurationBlock_markTypeOccurrences= &Types >@@ -233,7 +234,7 @@ > JavadocConfigurationBlock_workspace_archive_selection_dialog_title=Javadoc Archive Selection Dialog > JavadocConfigurationBlock_workspace_archive_selection_dialog_description=&Choose the archive containing the documentation: > JavadocConfigurationPropertyPage_IsIncorrectElement_description=Javadoc location can only be attached to Java projects or archives and class folders in Java projects. Source folders use the location specified at their project. >-JavadocConfigurationPropertyPage_IsJavaProject_description=Specify the location of the project\'s Javadoc documentation. This location is used by the Javadoc export wizard as the default value and by the \'Open Attached Javadoc\' action. For example: \'file:/c:/myworkspace/myproject/doc\'. >+JavadocConfigurationPropertyPage_IsJavaProject_description=Specify the location of the project's Javadoc documentation. This location is used by the Javadoc export wizard as the default value and by the 'Open Attached Javadoc' action. For example\: 'file\:/c\:/myworkspace/myproject/doc'. > JavadocConfigurationPropertyPage_invalid_container=The current class path entry belongs to container ''{0}'' which can not be configured. > JavadocConfigurationPropertyPage_location_path=&Location path: > JavadocConfigurationPropertyPage_locationPath_none=(none) >@@ -289,7 +290,7 @@ > AppearancePreferencePage_pkgNamePatternEnable_label= &Compress all package name segments, except the final segment > AppearancePreferencePage_pkgNamePattern_label= Com&pression pattern (e.g. given package name 'org.eclipse.jdt', pattern '.' will compress it to '..jdt', '0' to 'jdt', '1~.' to 'o~.e~.jdt'): > AppearancePreferencePage_pkgNamePatternAbbreviateEnable_label= A&bbreviate package names >-AppearancePreferencePage_pkgNamePatternAbbreviate_label= &Newline separated 'package_name=abbreviation' style abbreviation rules (e.g. rule 'org.eclipse.jdt={JDT}' will abbreviate 'org.eclipse.jdt.ui' to '{JDT}.ui').\nUse '#' at beginning to disable a rule: >+AppearancePreferencePage_pkgNamePatternAbbreviate_label= &Newline separated 'package_name\=abbreviation' style abbreviation rules (e.g. rule 'org.eclipse.jdt\={JDT}' will abbreviate 'org.eclipse.jdt.ui' to '{JDT}.ui').\nUse '\#' at beginning to disable a rule\: > AppearancePreferencePage_showMembersInPackagesView=S&how members in Package Explorer > AppearancePreferencePage_stackViewsVerticallyInTheJavaBrowsingPerspective=&Stack views vertically in the Java Browsing perspective > AppearancePreferencePage_note=Note: >@@ -648,7 +649,7 @@ > CodeTemplateBlock_error_read_title= Code Templates > CodeTemplateBlock_error_read_message= Failed to read templates. > >-CodeTemplateBlock_error_parse_message= Failed to parse templates:\n{0} >+CodeTemplateBlock_error_parse_message= Failed to parse templates\:\n{0} > > CodeTemplateBlock_error_write_title=Code Templates > CodeTemplateBlock_error_write_message=Failed to write templates. >@@ -812,7 +813,7 @@ > PropertiesFileEditorPreferencePage_preview= Previe&w: > > # DO NOT TRANSLATE "org.eclipse.ui.preferencePages.GeneralTextEditor" and "org.eclipse.ui.preferencePages.ColorsAndFonts" >-PropertiesFileEditorPreferencePage_link= Properties file editor preferences. See <a href=\"org.eclipse.ui.preferencePages.GeneralTextEditor\">'Text Editors'</a> for general text editor preferences and <a href=\"org.eclipse.ui.preferencePages.ColorsAndFonts\">'Colors and Fonts'</a> to configure the font. >+PropertiesFileEditorPreferencePage_link= Properties file editor preferences. See <a href\="org.eclipse.ui.preferencePages.GeneralTextEditor">'Text Editors'</a> for general text editor preferences and <a href\="org.eclipse.ui.preferencePages.ColorsAndFonts">'Colors and Fonts'</a> to configure the font. > > # smart typing block > SmartTypingConfigurationBlock_autoclose_title=Automatically close >@@ -871,10 +872,10 @@ > > FavoriteStaticMemberInputDialog_member_new_title= New Member Favorite > FavoriteStaticMemberInputDialog_member_edit_title= Edit Member Favorite >-FavoriteStaticMemberInputDialog_member_labelText= Enter a fully qualified static member (e.g. \'java.lang.Math.sqrt\'): >+FavoriteStaticMemberInputDialog_member_labelText= Enter a fully qualified static member (e.g. 'java.lang.Math.sqrt')\: > FavoriteStaticMemberInputDialog_type_new_title= New Type Favorite > FavoriteStaticMemberInputDialog_type_edit_title= Edit Type Favorite >-FavoriteStaticMemberInputDialog_type_labelText= Enter a fully qualified type (e.g. \'java.lang.Math\'): >+FavoriteStaticMemberInputDialog_type_labelText= Enter a fully qualified type (e.g. 'java.lang.Math')\: > FavoriteStaticMemberInputDialog_browse_button= &Browse... > FavoriteStaticMemberInputDialog_ChooseTypeDialog_title= Type Selection > FavoriteStaticMemberInputDialog_ChooseTypeDialog_description= Choose type name: >Index: ui/org/eclipse/jdt/internal/ui/preferences/UserLibraryPreferencePage.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/UserLibraryPreferencePage.java,v >retrieving revision 1.56 >diff -u -r1.56 UserLibraryPreferencePage.java >--- ui/org/eclipse/jdt/internal/ui/preferences/UserLibraryPreferencePage.java 1 Mar 2011 11:50:45 -0000 1.56 >+++ ui/org/eclipse/jdt/internal/ui/preferences/UserLibraryPreferencePage.java 7 Jun 2011 11:09:49 -0000 >@@ -765,12 +765,13 @@ > > private static final int IDX_NEW= 0; > private static final int IDX_EDIT= 1; >- private static final int IDX_ADD= 2; >- private static final int IDX_REMOVE= 3; >- private static final int IDX_UP= 5; >- private static final int IDX_DOWN= 6; >- private static final int IDX_LOAD= 8; >- private static final int IDX_SAVE= 9; >+ private static final int IDX_ADD = 2; >+ private static final int IDX_ADD_EXTERNAL= 3; >+ private static final int IDX_REMOVE= 4; >+ private static final int IDX_UP= 6; >+ private static final int IDX_DOWN= 7; >+ private static final int IDX_LOAD= 9; >+ private static final int IDX_SAVE= 10; > > /** > * Constructor for ClasspathVariablesPreferencePage >@@ -793,6 +794,7 @@ > PreferencesMessages.UserLibraryPreferencePage_libraries_new_button, > PreferencesMessages.UserLibraryPreferencePage_libraries_edit_button, > PreferencesMessages.UserLibraryPreferencePage_libraries_addjar_button, >+ PreferencesMessages.UserLibraryPreferencePage_libraries_addexternaljar_button, > PreferencesMessages.UserLibraryPreferencePage_libraries_remove_button, > null, > PreferencesMessages.UserLibraryPreferencePage_UserLibraryPreferencePage_libraries_up_button, >@@ -1032,6 +1034,7 @@ > field.enableButton(IDX_REMOVE, canRemove(list)); > field.enableButton(IDX_EDIT, canEdit(list)); > field.enableButton(IDX_ADD, canAdd(list)); >+ field.enableButton(IDX_ADD_EXTERNAL, canAdd(list)); > field.enableButton(IDX_UP, canMoveUp(list)); > field.enableButton(IDX_DOWN, canMoveDown(list)); > field.enableButton(IDX_SAVE, field.getSize() > 0); >@@ -1042,6 +1045,8 @@ > editUserLibraryElement(null); > } else if (index == IDX_ADD) { > doAdd(field.getSelectedElements()); >+ } else if (index == IDX_ADD_EXTERNAL) { >+ doAddExternal(field.getSelectedElements()); > } else if (index == IDX_REMOVE) { > doRemove(field.getSelectedElements()); > } else if (index == IDX_EDIT) { >@@ -1103,7 +1108,7 @@ > } > > private void editArchiveElement(CPListElement existingElement, CPUserLibraryElement parent) { >- CPListElement[] elements= openExtJarFileDialog(existingElement, parent); >+ CPListElement[] elements= openJarFileDialog(existingElement, parent); > if (elements != null) { > for (int i= 0; i < elements.length; i++) { > if (existingElement != null) { >@@ -1169,6 +1174,32 @@ > > private void doAdd(List<Object> list) { > if (canAdd(list)) { >+ CPUserLibraryElement parentLibrary = getSingleSelectedLibrary(list); >+ //editArchiveElement(null, element); >+ >+ IPath selectedPaths[] = BuildPathDialogAccess.chooseJAREntries(this.getShell(), null, new IPath[0]); >+ >+ if (selectedPaths != null) { >+ List<CPListElement> elements = new ArrayList<CPListElement>(); >+ for (int i= 0; i < selectedPaths.length; i++) { >+ CPListElement cpElement = new CPListElement(parentLibrary, fDummyProject, IClasspathEntry.CPE_LIBRARY, selectedPaths[i], null); >+ cpElement.setAttribute(CPListElement.SOURCEATTACHMENT, BuildPathSupport.guessSourceAttachment(cpElement)); >+ cpElement.setAttribute(CPListElement.JAVADOC, BuildPathSupport.guessJavadocLocation(cpElement)); >+ >+ elements.add(cpElement); >+ >+ parentLibrary.add(cpElement); >+ } >+ fLibraryList.refresh(parentLibrary); >+ fLibraryList.selectElements(new StructuredSelection(elements)); >+ fLibraryList.expandElement(parentLibrary, 2); >+ } >+ >+ } >+ } >+ >+ private void doAddExternal(List<Object> list) { >+ if (canAdd(list)) { > CPUserLibraryElement element= getSingleSelectedLibrary(list); > editArchiveElement(null, element); > } >@@ -1331,9 +1362,43 @@ > } > return false; > } >+ >+ private CPListElement[] openJarFileDialog(CPListElement existing, Object parent) { >+ if (existing == null) { >+ return doOpenExternalJarFileDialog(existing, parent); >+ } >+ else { >+ IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot(); >+ IPath path = existing.getPath(); >+ >+ if (root.exists(path)) { >+ return doOpenInternalJarFileDialog(existing, parent); >+ } >+ else { >+ return doOpenExternalJarFileDialog(existing, parent); >+ } >+ } >+ } > >- >- private CPListElement[] openExtJarFileDialog(CPListElement existing, Object parent) { >+ private CPListElement[] doOpenInternalJarFileDialog(CPListElement existing, Object parent) { >+ IPath path = existing.getPath(); >+ IPath selectedPaths[] = BuildPathDialogAccess.chooseJAREntries(this.getShell(), path, new IPath[0]); >+ >+ if (selectedPaths != null) { >+ List<CPListElement> elements = new ArrayList<CPListElement>(); >+ for (int i= 0; i < selectedPaths.length; i++) { >+ CPListElement cpElement = new CPListElement(parent, fDummyProject, IClasspathEntry.CPE_LIBRARY, selectedPaths[i], null); >+ cpElement.setAttribute(CPListElement.SOURCEATTACHMENT, BuildPathSupport.guessSourceAttachment(cpElement)); >+ cpElement.setAttribute(CPListElement.JAVADOC, BuildPathSupport.guessJavadocLocation(cpElement)); >+ >+ elements.add(cpElement); >+ } >+ return elements.toArray(new CPListElement[0]); >+ } >+ return null; >+ } >+ >+ private CPListElement[] doOpenExternalJarFileDialog(CPListElement existing, Object parent) { > String lastUsedPath; > if (existing != null) { > lastUsedPath= existing.getPath().removeLastSegments(1).toOSString();
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 70417
:
197492