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 120433 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 1
patch_257956_2.txt (text/plain), 7.40 KB, created by
Hitesh
on 2008-12-15 01:07:31 EST
(
hide
)
Description:
Patch 1
Filename:
MIME Type:
Creator:
Hitesh
Created:
2008-12-15 01:07:31 EST
Size:
7.40 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 14 Dec 2008 14:03:26 -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,52 @@ > } > > /** >+ * Opens Input Dialog for filter name, >+ * creates a new filter, and adds it to the filterGroups >+ * @param clone true clones the selected filter >+ * >+ */ >+ 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 filter called newName > * > * @param newName > */ >- private void createNewFilter(String newName) { >+ private void createNewFilter(String newName,boolean cloneSelected) { > MarkerFieldFilterGroup group = new MarkerFieldFilterGroup(null, builder); >+ if(cloneSelected&&selectedFilterGroup!=null){ >+ //toClone.populateClone(group); //copies last saved values >+ applyChanges(group); //copy current values from UI >+ } > group.setName(newName); > filterGroups.add(group); > filtersList.refresh(); >@@ -519,9 +538,21 @@ > .next(); > group.setEnabled(filtersList.getChecked(group)); > } >- if (selectedFilterGroup != null) { >+ applyChanges(selectedFilterGroup); >+ >+ super.okPressed(); > >- scopeArea.applyToGroup(selectedFilterGroup); >+ } >+ >+ /** >+ * Apply changes made on the dialog to the filtergroup >+ * @param filtergroup >+ * >+ */ >+ private void applyChanges(MarkerFieldFilterGroup filtergroup) { >+ if (filtergroup != null) { >+ >+ 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 14 Dec 2008 14:03:33 -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 14 Dec 2008 14:03:34 -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
Actions:
View
|
Diff
Attachments on
bug 257956
:
120433
|
120663