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 120663 Details for
Bug 257956
[Markers] Improvement requests to Problems View / Configure Contents dialog
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]
Patch 2
patch_257956_2.2.txt (text/plain), 7.55 KB, created by
Hitesh
on 2008-12-17 03:02:49 EST
(
hide
)
Description:
Patch 2
Filename:
MIME Type:
Creator:
Hitesh
Created:
2008-12-17 03:02:49 EST
Size:
7.55 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.ide >Index: src/org/eclipse/ui/internal/views/markers/FiltersConfigurationDialog.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/FiltersConfigurationDialog.java,v >retrieving revision 1.8 >diff -u -r1.8 FiltersConfigurationDialog.java >--- src/org/eclipse/ui/internal/views/markers/FiltersConfigurationDialog.java 14 Mar 2008 13:31:41 -0000 1.8 >+++ src/org/eclipse/ui/internal/views/markers/FiltersConfigurationDialog.java 17 Dec 2008 07:45:14 -0000 >@@ -82,6 +82,8 @@ > > private Button removeButton; > >+ private Button cloneButton; >+ > /** > * Create a new instance of the receiver on builder. > * >@@ -326,42 +328,19 @@ > addNew.setText(MarkerMessages.MarkerFilter_addFilterName); > addNew.addSelectionListener(new SelectionAdapter() { > public void widgetSelected(SelectionEvent e) { >- InputDialog newDialog = new InputDialog(getShell(), >- MarkerMessages.MarkerFilterDialog_title, >- MarkerMessages.MarkerFilterDialog_message, >- MarkerMessages.MarkerFilter_newFilterName, >- new IInputValidator() { >- /* >- * (non-Javadoc) >- * >- * @see org.eclipse.jface.dialogs.IInputValidator#isValid(java.lang.String) >- */ >- public String isValid(String newText) { >- if (newText.length() == 0) >- return MarkerMessages.MarkerFilterDialog_emptyMessage; >- Iterator filterIterator = filterGroups >- .iterator(); >- while (filterIterator.hasNext()) { >- if (((MarkerFieldFilterGroup) filterIterator >- .next()).getName().equals(newText)) >- return NLS >- .bind( >- MarkerMessages.filtersDialog_conflictingName, >- newText); >- } >- >- return null; >- } >- }); >- if (Window.OK == newDialog.open()) { >- String newName = newDialog.getValue(); >- if (newName != null) { >- createNewFilter(newName); >- } >- } >- } >+ addNewFilter(false); >+ } > }); > setButtonLayoutData(addNew); >+ >+ cloneButton= new Button(buttons, SWT.PUSH); >+ cloneButton.setText(MarkerMessages.MarkerFilter_cloneFilterName); >+ cloneButton.addSelectionListener(new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ addNewFilter(true); >+ } >+ }); >+ setButtonLayoutData(cloneButton); > > removeButton = new Button(buttons, SWT.PUSH); > removeButton.setText(MarkerMessages.MarkerFilter_deleteSelectedName); >@@ -411,12 +390,51 @@ > } > > /** >- * Create a new filter called newName >- * >- * @param newName >+ * Opens Input Dialog for name,creates a >+ * new filterGroup, and adds it to the filterGroups >+ * @param cloneSelected true clones the selected filterGroup >+ * >+ */ >+ private void addNewFilter(boolean cloneSelected) { >+ InputDialog newDialog = new InputDialog(getShell(), >+ MarkerMessages.MarkerFilterDialog_title, >+ MarkerMessages.MarkerFilterDialog_message, >+ MarkerMessages.MarkerFilter_newFilterName, >+ new IInputValidator() { >+ public String isValid(String newText) { >+ if (newText.length() == 0) >+ return MarkerMessages.MarkerFilterDialog_emptyMessage; >+ Iterator filterIterator = filterGroups >+ .iterator(); >+ while (filterIterator.hasNext()) { >+ if (((MarkerFieldFilterGroup) filterIterator >+ .next()).getName().equals(newText)) >+ return NLS >+ .bind( >+ MarkerMessages.filtersDialog_conflictingName, >+ newText); >+ } >+ >+ return null; >+ } >+ }); >+ if (Window.OK == newDialog.open()) { >+ String newName = newDialog.getValue(); >+ if (newName != null) { >+ createNewFilter(newName,cloneSelected); >+ } >+ } >+ } >+ /** >+ * Create a new filterGroup, and adds it to the filterGroups >+ * @param cloneSelected true clones the selected filterGroup >+ * @param newName name of new filterGroup > */ >- private void createNewFilter(String newName) { >+ private void createNewFilter(String newName,boolean cloneSelected) { > MarkerFieldFilterGroup group = new MarkerFieldFilterGroup(null, builder); >+ if(cloneSelected&&selectedFilterGroup!=null){ >+ captureStateInto(group); //copy current values from UI >+ } > group.setName(newName); > filterGroups.add(group); > filtersList.refresh(); >@@ -519,9 +537,22 @@ > .next(); > group.setEnabled(filtersList.getChecked(group)); > } >- if (selectedFilterGroup != null) { >+ captureStateInto(selectedFilterGroup); >+ >+ super.okPressed(); >+ >+ } >+ >+ /** >+ * >+ * Updates the filterGroup with the values showing in the dialog's GUI. >+ * @param filterGroup >+ * >+ */ >+ private void captureStateInto(MarkerFieldFilterGroup filterGroup) { >+ if (filterGroup != null) { > >- scopeArea.applyToGroup(selectedFilterGroup); >+ scopeArea.applyToGroup(filterGroup); > Iterator areas = filterAreas.iterator(); > while (areas.hasNext()) { > FilterConfigurationArea area = (FilterConfigurationArea) areas >@@ -530,13 +561,10 @@ > // Handle the internal special cases > if (area instanceof GroupFilterConfigurationArea) > ((GroupFilterConfigurationArea) area) >- .applyToGroup(selectedFilterGroup); >- area.apply(selectedFilterGroup.getFilter(area.getField())); >+ .applyToGroup(filterGroup); >+ area.apply(filterGroup.getFilter(area.getField())); > } > } >- >- super.okPressed(); >- > } > > /** >@@ -609,7 +637,8 @@ > removeButton > .setEnabled(!(markerFieldFilterGroup == null || markerFieldFilterGroup > .isSystem())); >- >+ cloneButton.setEnabled(markerFieldFilterGroup != null); >+ > MarkerFieldFilterGroup old = selectedFilterGroup; > selectedFilterGroup = markerFieldFilterGroup; > if (old != null) >Index: src/org/eclipse/ui/views/markers/internal/MarkerMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerMessages.java,v >retrieving revision 1.62 >diff -u -r1.62 MarkerMessages.java >--- src/org/eclipse/ui/views/markers/internal/MarkerMessages.java 25 Apr 2008 12:53:22 -0000 1.62 >+++ src/org/eclipse/ui/views/markers/internal/MarkerMessages.java 17 Dec 2008 07:45:15 -0000 >@@ -196,6 +196,7 @@ > public static String MarkerFilter_newFilterName; > public static String MarkerFilter_filtersTitle; > public static String MarkerFilter_addFilterName; >+ public static String MarkerFilter_cloneFilterName; > public static String MarkerFilter_deleteSelectedName; > public static String MarkerFilter_showAllCommand_title; > public static String MarkerFilter_ConfigureContentsCommand_title; >Index: src/org/eclipse/ui/views/markers/internal/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/messages.properties,v >retrieving revision 1.83 >diff -u -r1.83 messages.properties >--- src/org/eclipse/ui/views/markers/internal/messages.properties 25 Apr 2008 12:53:22 -0000 1.83 >+++ src/org/eclipse/ui/views/markers/internal/messages.properties 17 Dec 2008 07:45:15 -0000 >@@ -177,6 +177,7 @@ > MarkerFilter_newFilterName=New Filter > MarkerFilter_filtersTitle=User f&ilters: > MarkerFilter_addFilterName=&New... >+MarkerFilter_cloneFilterName=&Duplicate... > MarkerFilter_deleteSelectedName = Remo&ve > MarkerFilter_showAllCommand_title = &Show All > MarkerFilter_ConfigureContentsCommand_title = &Configure Contents...
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
Flags:
emoffatt
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 257956
:
120433
| 120663