From 33cfed44daff2895734b6932f7826d2ca942cd09 Mon Sep 17 00:00:00 2001 From: bananeweizen Date: Tue, 17 Jan 2006 23:07:42 +0000 Subject: [PATCH] removed action for line delimiter conversion; this is provided by IDE now --- net.sourceforge.phpeclipse/plugin.xml | 33 ----------------- .../phpdt/internal/core/CompilationUnit.java | 37 +++++++++---------- .../phpdt/ui/actions/GenerateActionGroup.java | 23 ------------ 3 files changed, 18 insertions(+), 75 deletions(-) diff --git a/net.sourceforge.phpeclipse/plugin.xml b/net.sourceforge.phpeclipse/plugin.xml index 3dde386..873b7db 100644 --- a/net.sourceforge.phpeclipse/plugin.xml +++ b/net.sourceforge.phpeclipse/plugin.xml @@ -495,9 +495,6 @@ - - - - - - - - - - - - - visit method is called with the corresponding parse tree. If the visitor returns true, * this method visits this parse node's members. - * + * * @param visitor * the visitor * @exception JavaModelException @@ -165,7 +164,7 @@ public class CompilationUnit extends Openable implements ICompilationUnit, if (underlyingResource == null) { underlyingResource = getResource(); } - + SourceElementParser parser = new SourceElementParser(requestor, problemFactory, new CompilerOptions(options)); //, true/*report local declarations*/); @@ -349,7 +348,7 @@ public class CompilationUnit extends Openable implements ICompilationUnit, /** * Returns true if this handle represents the same Java element as the given handle. - * + * * @see Object#equals(java.lang.Object) */ public boolean equals(Object obj) { @@ -549,7 +548,7 @@ public class CompilationUnit extends Openable implements ICompilationUnit, /** * A compilation unit has a corresponding resource unless it is contained in a jar. - * + * * @see IJavaElement#getCorrespondingResource() */ public IResource getCorrespondingResource() throws JavaModelException { @@ -643,7 +642,7 @@ public class CompilationUnit extends Openable implements ICompilationUnit, } } - + /** * @see net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit#getMainTypeName() */ @@ -810,17 +809,17 @@ public class CompilationUnit extends Openable implements ICompilationUnit, // */ //public IJavaElement getSharedWorkingCopy(IProgressMonitor pm, IBufferFactory factory, IProblemRequestor problemRequestor) // throws JavaModelException { - // + // // // if factory is null, default factory must be used // if (factory == null) factory = this.getBufferManager().getDefaultBufferFactory(); // // JavaModelManager manager = JavaModelManager.getJavaModelManager(); - // + // // // In order to be shared, working copies have to denote the same compilation unit // // AND use the same buffer factory. // // Assuming there is a little set of buffer factories, then use a 2 level Map cache. // Map sharedWorkingCopies = manager.sharedWorkingCopies; - // + // // Map perFactoryWorkingCopies = (Map) sharedWorkingCopies.get(factory); // if (perFactoryWorkingCopies == null){ // perFactoryWorkingCopies = new HashMap(); @@ -919,7 +918,7 @@ public class CompilationUnit extends Openable implements ICompilationUnit, /** * If I am not open, return true to avoid parsing. - * + * * @see IParent#hasChildren() */ public boolean hasChildren() throws JavaModelException { @@ -974,7 +973,7 @@ public class CompilationUnit extends Openable implements ICompilationUnit, } /** - * + * * @see IOpenable */ public boolean isOpen() { @@ -1050,7 +1049,7 @@ public class CompilationUnit extends Openable implements ICompilationUnit, //public net.sourceforge.phpdt.core.dom.CompilationUnit makeConsistent(boolean createAST, int astLevel, IProgressMonitor monitor) // throws JavaModelException { // if (isConsistent()) return null; - // + // // // create a new info and make it the current info // // (this will remove the info and its children just before storing the new infos) // if (createAST) { @@ -1093,7 +1092,7 @@ public class CompilationUnit extends Openable implements ICompilationUnit, // BufferManager bufManager = getBufferManager(); // IBuffer buffer = getBufferFactory().createBuffer(this); // if (buffer == null) return null; - // + // // // set the buffer source // if (buffer.getCharacters() == null){ // IFile file = (IFile)this.getResource(); @@ -1103,10 +1102,10 @@ public class CompilationUnit extends Openable implements ICompilationUnit, // // // add buffer to buffer cache // bufManager.addBuffer(buffer); - // + // // // listen to buffer changes // buffer.addBufferChangedListener(this); - // + // // return buffer; //} /** @@ -1253,7 +1252,7 @@ public class CompilationUnit extends Openable implements ICompilationUnit, * @deprecated - use codeComplete(int, ICompletionRequestor) */ //public void codeComplete(int offset, final ICodeCompletionRequestor requestor) throws JavaModelException { - // + // // if (requestor == null){ // codeComplete(offset, (ICompletionRequestor)null); // return; diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/actions/GenerateActionGroup.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/actions/GenerateActionGroup.java index 46d386a..e5f593a 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/actions/GenerateActionGroup.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/actions/GenerateActionGroup.java @@ -34,8 +34,6 @@ import org.eclipse.ui.actions.ActionGroup; import org.eclipse.ui.actions.AddBookmarkAction; import org.eclipse.ui.ide.IDEActionFactory; import org.eclipse.ui.part.Page; -import org.eclipse.ui.texteditor.ConvertLineDelimitersAction; -import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds; import org.eclipse.ui.texteditor.IUpdate; /** @@ -75,10 +73,6 @@ public class GenerateActionGroup extends ActionGroup { // private OrganizeImportsAction fOrganizeImports; - private ConvertLineDelimitersAction fConvertToWindows; - private ConvertLineDelimitersAction fConvertToUNIX; - private ConvertLineDelimitersAction fConvertToMac; - /** * Note: This constructor is for internal use only. Clients should not call this constructor. */ @@ -129,17 +123,6 @@ public class GenerateActionGroup extends ActionGroup { // fExternalizeStrings.editorStateChanged(); // editor.setAction("ExternalizeStrings", fExternalizeStrings); //$NON-NLS-1$ - fConvertToWindows= new ConvertLineDelimitersAction(editor, "\r\n"); //$NON-NLS-1$ - fConvertToWindows.setActionDefinitionId( ITextEditorActionDefinitionIds .CONVERT_LINE_DELIMITERS_TO_WINDOWS); - editor.setAction("ConvertLineDelimitersToWindows", fConvertToWindows); //$NON-NLS-1$ - - fConvertToUNIX= new ConvertLineDelimitersAction(editor, "\n"); //$NON-NLS-1$ - fConvertToUNIX.setActionDefinitionId( ITextEditorActionDefinitionIds .CONVERT_LINE_DELIMITERS_TO_UNIX); - editor.setAction("ConvertLineDelimitersToUNIX", fConvertToUNIX); //$NON-NLS-1$ - - fConvertToMac= new ConvertLineDelimitersAction(editor, "\r"); //$NON-NLS-1$ - fConvertToMac.setActionDefinitionId( ITextEditorActionDefinitionIds .CONVERT_LINE_DELIMITERS_TO_MAC); - editor.setAction("ConvertLineDelimitersToMac", fConvertToMac); //$NON-NLS-1$ } /** @@ -224,9 +207,6 @@ public class GenerateActionGroup extends ActionGroup { Assert.isTrue(isEditorOwner()); // http://dev.eclipse.org/bugs/show_bug.cgi?id=17709 - fConvertToMac.update(); - fConvertToUNIX.update(); - fConvertToWindows.update(); } /* (non-Javadoc) @@ -339,9 +319,6 @@ public class GenerateActionGroup extends ActionGroup { // actionBar.setGlobalActionHandler(JdtActionConstants.EXTERNALIZE_STRINGS, fExternalizeStrings); // actionBar.setGlobalActionHandler(JdtActionConstants.FIND_STRINGS_TO_EXTERNALIZE, fFindStringsToExternalize); // actionBar.setGlobalActionHandler(JdtActionConstants.ORGANIZE_IMPORTS, fOrganizeImports); - actionBar.setGlobalActionHandler(PHPdtActionConstants.CONVERT_LINE_DELIMITERS_TO_WINDOWS, fConvertToWindows); - actionBar.setGlobalActionHandler(PHPdtActionConstants.CONVERT_LINE_DELIMITERS_TO_UNIX, fConvertToUNIX); - actionBar.setGlobalActionHandler(PHPdtActionConstants.CONVERT_LINE_DELIMITERS_TO_MAC, fConvertToMac); if (!isEditorOwner()) { // editor provides its own implementation of these actions. actionBar.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(), fAddBookmark); -- 1.7.1