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 167472 Details for
Bug 311835
[preferences] Add option for FORMATTER_USE_ON_OFF_TAGS (bug 311582)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Fix
patch.txt (text/plain), 5.93 KB, created by
Dani Megert
on 2010-05-07 09:52:37 EDT
(
hide
)
Description:
Fix
Filename:
MIME Type:
Creator:
Dani Megert
Created:
2010-05-07 09:52:37 EDT
Size:
5.93 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui >Index: ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.java,v >retrieving revision 1.35 >diff -u -r1.35 FormatterMessages.java >--- ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.java 3 Mar 2010 17:32:03 -0000 1.35 >+++ ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.java 7 May 2010 13:51:33 -0000 >@@ -408,6 +408,7 @@ > public static String IndentationTabPage_use_tabs_only_for_leading_indentations; > > public static String OffOnTagsTabPage_description; >+ public static String OffOnTagsTabPage_enableOffOnTags; > public static String OffOnTagsTabPage_disableTag; > public static String OffOnTagsTabPage_enableTag; > public static String OffOnTagsTabPage_error_startsWithWhitespace; >Index: ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties,v >retrieving revision 1.92 >diff -u -r1.92 FormatterMessages.properties >--- ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties 3 Mar 2010 17:30:52 -0000 1.92 >+++ ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties 7 May 2010 13:51:34 -0000 >@@ -494,10 +494,11 @@ > NewLinesTabPage_annotations_group_paramters=Insert new line after annotations on parameters > NewLinesTabPage_annotations_group_title=Annotations > >-OffOnTagsTabPage_description=The following tags can be used in any comments to turn the formatter off and on in a source file.\n\ >+OffOnTagsTabPage_description=Off / on tags can be used in any comments to turn the formatter off and on in a source file.\n\ > - At the beginning of each file, the formatter is enabled.\n\ > - Each time the formatter sees an off tag, it disables formatting for that comment and the source after it.\n\ >-- Each time the formatter sees an on tag, it enables formatting for the source after that comment. >+- Each time the formatter sees an on tag, it enables formatting for the source after that comment.\n >+OffOnTagsTabPage_enableOffOnTags=&Enable Off / On tags > OffOnTagsTabPage_disableTag=O&ff tag: > OffOnTagsTabPage_enableTag=&On tag: > OffOnTagsTabPage_error_startsWithWhitespace=This value must not start with a white space. >Index: ui/org/eclipse/jdt/internal/ui/preferences/formatter/OffOnTagsTabPage.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/OffOnTagsTabPage.java,v >retrieving revision 1.1 >diff -u -r1.1 OffOnTagsTabPage.java >--- ui/org/eclipse/jdt/internal/ui/preferences/formatter/OffOnTagsTabPage.java 3 Mar 2010 17:30:52 -0000 1.1 >+++ ui/org/eclipse/jdt/internal/ui/preferences/formatter/OffOnTagsTabPage.java 7 May 2010 13:51:34 -0000 >@@ -16,6 +16,9 @@ > import org.eclipse.swt.layout.GridData; > import org.eclipse.swt.layout.GridLayout; > import org.eclipse.swt.widgets.Composite; >+import org.eclipse.swt.widgets.Event; >+import org.eclipse.swt.widgets.Label; >+import org.eclipse.swt.widgets.Listener; > > import org.eclipse.jface.dialogs.IDialogConstants; > import org.eclipse.jface.dialogs.IInputValidator; >@@ -38,6 +41,17 @@ > protected void doCreatePreferences(Composite composite, int numColumns) { > createLabel(numColumns, composite, FormatterMessages.OffOnTagsTabPage_description); > >+ // Add some vertical space >+ Label separator= new Label(composite, SWT.NONE); >+ separator.setVisible(false); >+ GridData data= new GridData(GridData.FILL, GridData.FILL, false, false, numColumns, 1); >+ data.heightHint= fPixelConverter.convertHeightInCharsToPixels(1) / 3; >+ separator.setLayoutData(data); >+ >+ final CheckboxPreference enablePref= createCheckboxPref(composite, numColumns, FormatterMessages.OffOnTagsTabPage_enableOffOnTags, DefaultCodeFormatterConstants.FORMATTER_USE_ON_OFF_TAGS, >+ FALSE_TRUE); >+ >+ > IInputValidator inputValidator= new IInputValidator() { > /* > * @see org.eclipse.jdt.internal.ui.preferences.formatter.ModifyDialogTabPage.StringPreference.Validator#isValid(java.lang.String) >@@ -57,8 +71,31 @@ > } > }; > >- createStringPref(composite, numColumns, FormatterMessages.OffOnTagsTabPage_disableTag, DefaultCodeFormatterConstants.FORMATTER_DISABLING_TAG, inputValidator); >- createStringPref(composite, numColumns, FormatterMessages.OffOnTagsTabPage_enableTag, DefaultCodeFormatterConstants.FORMATTER_ENABLING_TAG, inputValidator); >+ Composite tagComposite= new Composite(composite, SWT.NONE); >+ final int indent= fPixelConverter.convertWidthInCharsToPixels(4); >+ GridLayout layout= new GridLayout(numColumns, false); >+ layout.marginWidth= 0; >+ layout.marginHeight= 0; >+ layout.marginLeft= indent; >+ tagComposite.setLayout(layout); >+ >+ final StringPreference disableTagPref= createStringPref(tagComposite, numColumns, FormatterMessages.OffOnTagsTabPage_disableTag, DefaultCodeFormatterConstants.FORMATTER_DISABLING_TAG, >+ inputValidator); >+ final StringPreference enableTagPref= createStringPref(tagComposite, numColumns, FormatterMessages.OffOnTagsTabPage_enableTag, DefaultCodeFormatterConstants.FORMATTER_ENABLING_TAG, >+ inputValidator); >+ >+ enablePref.getControl().addListener(SWT.Selection, new Listener() { >+ public void handleEvent(Event event) { >+ boolean enabled= enablePref.getChecked(); >+ enableTagPref.setEnabled(enabled); >+ disableTagPref.setEnabled(enabled); >+ } >+ }); >+ >+ boolean enabled= enablePref.getChecked(); >+ enableTagPref.setEnabled(enabled); >+ disableTagPref.setEnabled(enabled); >+ > } > > public final Composite createContents(Composite parent) {
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 311835
: 167472