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 70941 Details for
Bug 192045
[nls tooling] Properties file editor should have "toggle comment" action
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch to org.eclipse.jdt.ui
192045 property toggle comment.patch (text/plain), 5.76 KB, created by
Brock Janiczak
on 2007-06-11 23:05:18 EDT
(
hide
)
Description:
patch to org.eclipse.jdt.ui
Filename:
MIME Type:
Creator:
Brock Janiczak
Created:
2007-06-11 23:05:18 EDT
Size:
5.76 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/plugin.xml,v >retrieving revision 1.742 >diff -u -r1.742 plugin.xml >--- plugin.xml 23 May 2007 12:05:49 -0000 1.742 >+++ plugin.xml 12 Jun 2007 02:59:51 -0000 >@@ -3059,6 +3059,12 @@ > parentId="org.eclipse.ui.textEditorScope" > id="org.eclipse.jdt.ui.javaEditorScope"> > </context> >+ <context >+ description="Editing properties files" >+ id="org.eclipse.jdt.ui.propertiesEditorScope" >+ name="Editing properties files" >+ parentId="org.eclipse.ui.textEditorScope"> >+ </context> > </extension> > > <extension >@@ -3973,6 +3979,11 @@ > commandId="org.eclipse.jdt.ui.edit.text.java.toggle.comment" > schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/> > <key >+ sequence="M1+/" >+ contextId="org.eclipse.jdt.ui.propertiesEditorScope" >+ commandId="org.eclipse.jdt.ui.edit.text.java.toggle.comment" >+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/> >+ <key > sequence="M1+7" > contextId="org.eclipse.jdt.ui.javaEditorScope" > commandId="org.eclipse.jdt.ui.edit.text.java.toggle.comment" >Index: ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileEditor.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileEditor.java,v >retrieving revision 1.20 >diff -u -r1.20 PropertiesFileEditor.java >--- ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileEditor.java 28 Mar 2006 16:53:47 -0000 1.20 >+++ ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileEditor.java 12 Jun 2007 02:59:55 -0000 >@@ -10,14 +10,19 @@ > *******************************************************************************/ > package org.eclipse.jdt.internal.ui.propertiesfileeditor; > >+import java.util.ResourceBundle; >+ > import org.eclipse.swt.SWT; > >+import org.eclipse.jface.action.IAction; > import org.eclipse.jface.preference.IPreferenceStore; > import org.eclipse.jface.util.PropertyChangeEvent; > > import org.eclipse.jface.text.source.ISourceViewer; >+import org.eclipse.jface.text.source.SourceViewerConfiguration; > > import org.eclipse.ui.IPageLayout; >+import org.eclipse.ui.PlatformUI; > import org.eclipse.ui.part.IShowInTargetList; > > import org.eclipse.ui.editors.text.TextEditor; >@@ -27,7 +32,9 @@ > import org.eclipse.jdt.ui.actions.JdtActionConstants; > import org.eclipse.jdt.ui.text.JavaTextTools; > >+import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; > import org.eclipse.jdt.internal.ui.JavaPlugin; >+import org.eclipse.jdt.internal.ui.javaeditor.ToggleCommentAction; > > /** > * Properties file editor. >@@ -52,6 +59,12 @@ > setSourceViewerConfiguration(new PropertiesFileSourceViewerConfiguration(textTools.getColorManager(), store, this, IPropertiesFilePartitions.PROPERTIES_FILE_PARTITIONING)); > } > >+ /* (non-Javadoc) >+ * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#initializeKeyBindingScopes() >+ */ >+ protected void initializeKeyBindingScopes() { >+ setKeyBindingScopes(new String[] { "org.eclipse.jdt.ui.propertiesEditorScope" }); //$NON-NLS-1$ >+ } > > /* > * @see org.eclipse.ui.editors.text.TextEditor#createActions() >@@ -59,11 +72,27 @@ > protected void createActions() { > super.createActions(); > >+ IAction action= new ToggleCommentAction(ResourceBundle.getBundle("org.eclipse.jdt.internal.ui.javaeditor.ConstructedJavaEditorMessages"), "ToggleComment.", this); //$NON-NLS-1$ >+ action.setActionDefinitionId(IJavaEditorActionDefinitionIds.TOGGLE_COMMENT); >+ setAction("ToggleComment", action); //$NON-NLS-1$ >+ markAsStateDependentAction("ToggleComment", true); //$NON-NLS-1$ >+ PlatformUI.getWorkbench().getHelpSystem().setHelp(action, IJavaHelpContextIds.TOGGLE_COMMENT_ACTION); >+ configureToggleCommentAction(); >+ > fOpenAction= new OpenAction(this); > fOpenAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_EDITOR); > setAction(JdtActionConstants.OPEN, fOpenAction); > } > >+ private void configureToggleCommentAction() { >+ IAction action= getAction("ToggleComment"); //$NON-NLS-1$ >+ if (action instanceof ToggleCommentAction) { >+ ISourceViewer sourceViewer= getSourceViewer(); >+ SourceViewerConfiguration configuration= getSourceViewerConfiguration(); >+ ((ToggleCommentAction)action).configure(sourceViewer, configuration); >+ } >+ } >+ > /* > * @see AbstractTextEditor#handlePreferenceStoreChanged(PropertyChangeEvent) > */ >Index: ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileSourceViewerConfiguration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileSourceViewerConfiguration.java,v >retrieving revision 1.24 >diff -u -r1.24 PropertiesFileSourceViewerConfiguration.java >--- ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileSourceViewerConfiguration.java 26 Jan 2007 10:02:40 -0000 1.24 >+++ ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileSourceViewerConfiguration.java 12 Jun 2007 02:59:55 -0000 >@@ -312,4 +312,10 @@ > return reconciler; > } > >+ /* (non-Javadoc) >+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getDefaultPrefixes(org.eclipse.jface.text.source.ISourceViewer, java.lang.String) >+ */ >+ public String[] getDefaultPrefixes(ISourceViewer sourceViewer, String contentType) { >+ return new String[] {"#", ""}; //$NON-NLS-1$ //$NON-NLS-2$ >+ } > }
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 192045
:
70941
|
71104