<separator
name="editGroup">
</separator>
- <separator
- name="convertGroup">
- </separator>
</menu>
<action
definitionId="net.sourceforge.phpeclipse.phpeditor.format"
menubarPath="edit/net.sourceforge.phpeclipse.ui.source.menu/editGroup"
id="net.sourceforge.phpeclipse.phpeditor.Comment">
</action>
-<!-- convert group -->
- <menu
- label="%ConvertLineDelimitersActions.label"
- path="edit/net.sourceforge.phpeclipse.ui.source.menu/convertGroup"
- id="convertSubMenu">
- <separator
- name="group1">
- </separator>
- </menu>
- <action
- label="%ConvertLineDelimitersToMacAction.label"
- retarget="true"
- menubarPath="edit/net.sourceforge.phpeclipse.ui.source.menu/convertSubMenu/group1"
- allowLabelUpdate="true"
- id="net.sourceforge.phpeclipse.ui.actions.ConvertLineDelimitersToMac">
- </action>
- <action
- label="%ConvertLineDelimitersToUNIXAction.label"
- retarget="true"
- menubarPath="edit/net.sourceforge.phpeclipse.ui.source.menu/convertSubMenu/group1"
- allowLabelUpdate="true"
- id="net.sourceforge.phpeclipse.ui.actions.ConvertLineDelimitersToUNIX">
- </action>
- <action
- label="%ConvertLineDelimitersToWindowsAction.label"
- retarget="true"
- menubarPath="edit/net.sourceforge.phpeclipse.ui.source.menu/convertSubMenu/group1"
- allowLabelUpdate="true"
- id="net.sourceforge.phpeclipse.ui.actions.ConvertLineDelimitersToWindows">
- </action>
</actionSet>
</extension>
<extension
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
import net.sourceforge.phpdt.core.IBuffer;
import net.sourceforge.phpdt.core.IBufferFactory;
import net.sourceforge.phpdt.core.ICodeAssist;
-import net.sourceforge.phpdt.core.ICodeCompletionRequestor;
import net.sourceforge.phpdt.core.ICompilationUnit;
import net.sourceforge.phpdt.core.IImportContainer;
import net.sourceforge.phpdt.core.IImportDeclaration;
public WorkingCopyOwner owner;
/**
* Constructs a handle to a compilation unit with the given name in the specified package for the specified owner
- *
+ *
* @exception IllegalArgumentException
* if the name of the compilation unit does not end with ".java"
*/
* Accepts the given visitor onto the parsed tree of this compilation unit, after having runned the name resolution. The visitor's
* corresponding <code>visit</code> method is called with the corresponding parse tree. If the visitor returns <code>true</code>,
* this method visits this parse node's members.
- *
+ *
* @param visitor
* the visitor
* @exception JavaModelException
if (underlyingResource == null) {
underlyingResource = getResource();
}
-
+
SourceElementParser parser = new SourceElementParser(requestor, problemFactory,
new CompilerOptions(options));
//, true/*report local declarations*/);
/**
* 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) {
/**
* A compilation unit has a corresponding resource unless it is contained in a jar.
- *
+ *
* @see IJavaElement#getCorrespondingResource()
*/
public IResource getCorrespondingResource() throws JavaModelException {
}
}
-
+
/**
* @see net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit#getMainTypeName()
*/
// */
//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();
/**
* If I am not open, return true to avoid parsing.
- *
+ *
* @see IParent#hasChildren()
*/
public boolean hasChildren() throws JavaModelException {
}
/**
- *
+ *
* @see IOpenable
*/
public boolean isOpen() {
//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) {
// 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();
//
// // add buffer to buffer cache
// bufManager.addBuffer(buffer);
- //
+ //
// // listen to buffer changes
// buffer.addBufferChangedListener(this);
- //
+ //
// return buffer;
//}
/**
* @deprecated - use codeComplete(int, ICompletionRequestor)
*/
//public void codeComplete(int offset, final ICodeCompletionRequestor requestor) throws JavaModelException {
- //
+ //
// if (requestor == null){
// codeComplete(offset, (ICompletionRequestor)null);
// return;
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;
/**
// 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.
*/
// 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$
}
/**
Assert.isTrue(isEditorOwner());
// http://dev.eclipse.org/bugs/show_bug.cgi?id=17709
- fConvertToMac.update();
- fConvertToUNIX.update();
- fConvertToWindows.update();
}
/* (non-Javadoc)
// 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);