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 22285 Details for
Bug 71271
add "insert spaces for tabs" function to sse editors
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]
org.eclipse.wst.sse.ui.patch
org.eclipse.wst.sse.ui.patch (text/plain), 7.90 KB, created by
Amy Wu
on 2005-06-02 17:43:23 EDT
(
hide
)
Description:
org.eclipse.wst.sse.ui.patch
Filename:
MIME Type:
Creator:
Amy Wu
Created:
2005-06-02 17:43:23 EDT
Size:
7.90 KB
patch
obsolete
>Index: src/org/eclipse/wst/sse/ui/internal/StructuredTextViewer.java >=================================================================== >RCS file: /home/webtools/wst/components/sse/plugins/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextViewer.java,v >retrieving revision 1.4 >diff -u -r1.4 StructuredTextViewer.java >--- src/org/eclipse/wst/sse/ui/internal/StructuredTextViewer.java 18 Apr 2005 07:59:42 -0000 1.4 >+++ src/org/eclipse/wst/sse/ui/internal/StructuredTextViewer.java 2 Jun 2005 21:24:42 -0000 >@@ -106,7 +106,7 @@ > } > } > } >- >+ > /** > * A private delegate class to move INodeSelectionListener and > * IDoubleClickListener off of the viewer's APIs >@@ -118,7 +118,7 @@ > > public void nodeSelectionChanged(NodeSelectionChangedEvent event) { > handleNodeSelectionChanged(event); >- } >+ } > } > > /** Text operation codes */ >@@ -140,9 +140,9 @@ > protected IContentAssistant fCorrectionAssistant; > protected boolean fCorrectionAssistantInstalled; > private IDocumentAdapter fDocAdapter; >- >+ > private InternalSelectionListener fSelectionListener = null; >- >+ > /** > * TODO Temporary workaround for BUG44665 > */ >@@ -159,6 +159,7 @@ > private TextVerifyListener fVerifyListener = new TextVerifyListener(); > > private ViewerSelectionManager fViewerSelectionManager; >+ private SourceViewerConfiguration fConfiguration; > > /** > * @see org.eclipse.jface.text.source.SourceViewer#SourceViewer(Composite, >@@ -216,9 +217,8 @@ > } > > /** >- * Should be identical to superclass version. Also, we get the tab width >- * from the preference manager. Plus, we get our own special Highlighter. >- * Plus we uninstall before installing. >+ * Should be identical to superclass version. Plus, we get our own special >+ * Highlighter. Plus we uninstall before installing. > */ > public void configure(SourceViewerConfiguration configuration) { > >@@ -348,18 +348,14 @@ > String[] prefixes = configuration.getIndentPrefixes(this, t); > if (prefixes != null && prefixes.length > 0) > setIndentPrefixes(prefixes, t); >- // removed 'defaultPrefix' for Eclipse V2 replaced with >- // defaultPrefixes >- /* >- * String prefix = configuration.getDefaultPrefix(this, t); if >- * (prefix != null && prefix.length() > 0) >- * setDefaultPrefix(prefix, t); >- */ >+ > prefixes = configuration.getDefaultPrefixes(this, t); > if (prefixes != null && prefixes.length > 0) > setDefaultPrefixes(prefixes, t); > } > activatePlugins(); >+ >+ fConfiguration = configuration; > } > > /** >@@ -518,6 +514,7 @@ > break; > case SHIFT_RIGHT : > beginRecording(TEXT_SHIFT_RIGHT, TEXT_SHIFT_RIGHT, cursorPosition, selectionLength); >+ updateIndentationPrefixes(); > super.doOperation(SHIFT_RIGHT); > selection = getTextWidget().getSelection(); > cursorPosition = selection.x; >@@ -526,6 +523,7 @@ > break; > case SHIFT_LEFT : > beginRecording(TEXT_SHIFT_LEFT, TEXT_SHIFT_LEFT, cursorPosition, selectionLength); >+ updateIndentationPrefixes(); > super.doOperation(SHIFT_LEFT); > selection = getTextWidget().getSelection(); > cursorPosition = selection.x; >@@ -560,7 +558,7 @@ > try { > // begin recording > beginRecording(FORMAT_ACTIVE_ELEMENTS_TEXT, FORMAT_ACTIVE_ELEMENTS_TEXT, cursorPosition, selectionLength); >- >+ > // format > Point s = getSelectedRange(); > IRegion region = new Region(s.x, s.y); >@@ -1066,38 +1064,17 @@ > * Uninstalls anything that was installed by configure > */ > public void unconfigure() { >- > Logger.trace("Source Editor", "StructuredTextViewer::unconfigure entry"); //$NON-NLS-1$ //$NON-NLS-2$ > if (fHighlighter != null) { > fHighlighter.uninstall(); > } > >- // presentationreconciler, reconciler, contentassist, infopresenter >- // are all unconfigured in superclass so think about removing from >- // here >- if (fPresentationReconciler != null) { >- fPresentationReconciler.uninstall(); >- fPresentationReconciler = null; >- } >- if (fReconciler != null) { >- fReconciler.uninstall(); >- fReconciler = null; >- } >- if (fContentAssistant != null) { >- fContentAssistant.uninstall(); >- fContentAssistantInstalled = false; >- } >- if (fInformationPresenter != null) >- fInformationPresenter.uninstall(); >- >- setHyperlinkDetectors(null, SWT.NONE); >- > // doesn't seem to be handled elsewhere, so we'll be sure error > // messages's are cleared. > setErrorMessage(null); > >- // unconfigure recently added to super class?! > super.unconfigure(); >+ fConfiguration = null; > Logger.trace("Source Editor", "StructuredTextViewer::unconfigure exit"); //$NON-NLS-1$ //$NON-NLS-2$ > } > >@@ -1116,4 +1093,19 @@ > if (event.getRequester() != null && event.getRequester().equals(this) && event.getDocument().equals(getDocument())) > setSelectedRange(event.getOffset(), event.getLength()); > } >+ >+ /** >+ * Make sure indentation is correct before using. >+ */ >+ private void updateIndentationPrefixes() { >+ SourceViewerConfiguration configuration = fConfiguration; >+ if (fConfiguration != null) { >+ String[] types = configuration.getConfiguredContentTypes(this); >+ for (int i = 0; i < types.length; i++) { >+ String[] prefixes = configuration.getIndentPrefixes(this, types[i]); >+ if (prefixes != null && prefixes.length > 0) >+ setIndentPrefixes(prefixes, types[i]); >+ } >+ } >+ } > } >Index: src/org/eclipse/wst/sse/ui/internal/autoedit/BasicAutoEditStrategy.java >=================================================================== >RCS file: /home/webtools/wst/components/sse/plugins/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/autoedit/BasicAutoEditStrategy.java,v >retrieving revision 1.1 >diff -u -r1.1 BasicAutoEditStrategy.java >--- src/org/eclipse/wst/sse/ui/internal/autoedit/BasicAutoEditStrategy.java 29 Mar 2005 18:26:45 -0000 1.1 >+++ src/org/eclipse/wst/sse/ui/internal/autoedit/BasicAutoEditStrategy.java 2 Jun 2005 21:24:42 -0000 >@@ -19,6 +19,9 @@ > import org.eclipse.ui.PlatformUI; > import org.eclipse.ui.texteditor.ITextEditor; > >+/** >+ * @deprecated Just copy the one helper method into your IAutoEditStrategy >+ */ > public abstract class BasicAutoEditStrategy implements IAutoEditStrategy { > /** > * Return the active text editor if possible, otherwise the active editor >Index: src/org/eclipse/wst/sse/ui/internal/provisional/StructuredTextViewerConfiguration.java >=================================================================== >RCS file: /home/webtools/wst/components/sse/plugins/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/StructuredTextViewerConfiguration.java,v >retrieving revision 1.2 >diff -u -r1.2 StructuredTextViewerConfiguration.java >--- src/org/eclipse/wst/sse/ui/internal/provisional/StructuredTextViewerConfiguration.java 25 May 2005 21:11:04 -0000 1.2 >+++ src/org/eclipse/wst/sse/ui/internal/provisional/StructuredTextViewerConfiguration.java 2 Jun 2005 21:24:42 -0000 >@@ -252,7 +252,7 @@ > /** > * @return Returns the editorPart. > */ >- public IEditorPart getEditorPart() { >+ protected IEditorPart getEditorPart() { > return editorPart; > } > >@@ -289,16 +289,12 @@ > * @see SourceViewerConfiguration#getHoverControlCreator(ISourceViewer) > */ > public IInformationControlCreator getInformationControlCreator(ISourceViewer sourceViewer) { >- return getInformationControlCreator(sourceViewer, false); >- } >- >- private IInformationControlCreator getInformationControlCreator(ISourceViewer sourceViewer, final boolean cutDown) { > return new IInformationControlCreator() { > public IInformationControl createInformationControl(Shell parent) { > // int style= cutDown ? SWT.NONE : (SWT.V_SCROLL | > // SWT.H_SCROLL); > int style = SWT.NONE; >- return new DefaultInformationControl(parent, style, new HTMLTextPresenter(cutDown)); >+ return new DefaultInformationControl(parent, style, new HTMLTextPresenter(false)); > } > }; > }
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 71271
:
22276
|
22277
|
22278
|
22279
|
22281
|
22282
|
22283
|
22284
| 22285 |
22286
|
22287
|
22288
|
22289
|
24931
|
24932
|
24933