Java Code Examples for org.eclipse.jdt.internal.ui.javaeditor.JavaEditor#getEditorSite()

The following examples show how to use org.eclipse.jdt.internal.ui.javaeditor.JavaEditor#getEditorSite() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: InlineAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Note: This constructor is for internal use only. Clients should not call this constructor.
 * @param editor the compilation unit editor
 *
 * @noreference This constructor is not intended to be referenced by clients.
 */
public InlineAction(JavaEditor editor) {
	//don't want to call 'this' here - it'd create useless action objects
	super(editor.getEditorSite());
	setText(RefactoringMessages.InlineAction_Inline);
	fEditor= editor;
	fInlineTemp		= new InlineTempAction(editor);
	fInlineConstant	= new InlineConstantAction(editor);
	fInlineMethod	= new InlineMethodAction(editor);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.INLINE_ACTION);
	setEnabled(SelectionConverter.getInputAsCompilationUnit(fEditor) != null);
}
 
Example 2
Source File: GWTOpenEditorActionGroup.java    From gwt-eclipse-plugin with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Note: This constructor is for internal use only. Clients should not call
 * this constructor.
 * 
 * @param editor the Java editor
 */
public GWTOpenEditorActionGroup(JavaEditor editor) {
  isEditorOwner = true;
  openAction = new GWTOpenAction(editor);
  openAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_EDITOR);
  editor.setAction("OpenEditor", openAction); //$NON-NLS-1$
  site = editor.getEditorSite();
  initialize(site.getSelectionProvider());
}
 
Example 3
Source File: InlineConstantAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
/**
 * Note: This constructor is for internal use only. Clients should not call this constructor.
 *
 * @param editor the java editor
 */
public InlineConstantAction(JavaEditor editor) {
	this(editor.getEditorSite());
	fEditor= editor;
	setEnabled(SelectionConverter.canOperateOn(fEditor));
}
 
Example 4
Source File: RenameJavaElementAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public RenameJavaElementAction(JavaEditor editor) {
	this(editor.getEditorSite());
	fEditor= editor;
	setEnabled(SelectionConverter.canOperateOn(fEditor));
}
 
Example 5
Source File: InlineMethodAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
/**
 * Note: This constructor is for internal use only. Clients should not call this constructor.
 * @param editor the java editor
 */
public InlineMethodAction(JavaEditor editor) {
	this(editor.getEditorSite());
	fEditor= editor;
	setEnabled(SelectionConverter.canOperateOn(fEditor));
}
 
Example 6
Source File: MoveStaticMembersAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public MoveStaticMembersAction(JavaEditor editor) {
	this(editor.getEditorSite());
	fEditor= editor;
	setEnabled(SelectionConverter.canOperateOn(fEditor));
}
 
Example 7
Source File: IntroduceParameterObjectAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
/**
 * Note: This constructor is for internal use only. Clients should not call this constructor.
 * @param editor the compilation unit editor
 */
public IntroduceParameterObjectAction(JavaEditor editor) {
	this(editor.getEditorSite());
	fEditor= editor;
	setEnabled(true);
}
 
Example 8
Source File: FindAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
FindAction(JavaEditor editor) {
	this(editor.getEditorSite());
	fEditor= editor;
	setEnabled(SelectionConverter.canOperateOn(fEditor));
}
 
Example 9
Source File: FindExceptionOccurrencesAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Note: This constructor is for internal use only. Clients should not call this constructor.
 *
 * @param editor the Java editor
 *
 * @noreference This constructor is not intended to be referenced by clients.
 */
public FindExceptionOccurrencesAction(JavaEditor editor) {
	this(editor.getEditorSite());
	fEditor= editor;
	setEnabled(getEditorInput(editor) != null);
}
 
Example 10
Source File: OpenSuperImplementationAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Note: This constructor is for internal use only. Clients should not call this constructor.
 * @param editor the Java editor
 *
 * @noreference This constructor is not intended to be referenced by clients.
 */
public OpenSuperImplementationAction(JavaEditor editor) {
	this(editor.getEditorSite());
	fEditor= editor;
	setEnabled(SelectionConverter.canOperateOn(fEditor));
}
 
Example 11
Source File: IntroduceFactoryAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Note: This constructor is for internal use only. Clients should not call this constructor.
 * @param editor the Java editor
 *
 * @noreference This constructor is not intended to be referenced by clients.
 */
public IntroduceFactoryAction(JavaEditor editor) {
	this(editor.getEditorSite());
	fEditor= editor;
	setEnabled(SelectionConverter.getInputAsCompilationUnit(fEditor) != null);
}
 
Example 12
Source File: FindImplementOccurrencesAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Note: This constructor is for internal use only. Clients should not call this constructor.
 *
 * @param editor the Java editor
 *
 * @noreference This constructor is not intended to be referenced by clients.
 */
public FindImplementOccurrencesAction(JavaEditor editor) {
	this(editor.getEditorSite());
	fEditor= editor;
	setEnabled(getEditorInput(editor) != null);
}
 
Example 13
Source File: ExtractClassAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Note: This constructor is for internal use only. Clients should not call this constructor.
 * @param editor the java editor
 *
 * @noreference This constructor is not intended to be referenced by clients.
 */
public ExtractClassAction(JavaEditor editor) {
	this(editor.getEditorSite());
	fEditor= editor;
	setEnabled(SelectionConverter.canOperateOn(fEditor));
}
 
Example 14
Source File: FindBreakContinueTargetOccurrencesAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Note: This constructor is for internal use only. Clients should not call this constructor.
 *
 * @param editor the Java editor
 *
 * @noreference This constructor is not intended to be referenced by clients.
 */
public FindBreakContinueTargetOccurrencesAction(JavaEditor editor) {
	this(editor.getEditorSite());
	fEditor= editor;
	setEnabled(getEditorInput(editor) != null);
}
 
Example 15
Source File: PushDownAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Note: This constructor is for internal use only. Clients should not call
 * this constructor.
 *
 * @param editor the java editor
 *
 * @noreference This constructor is not intended to be referenced by clients.
 */
public PushDownAction(JavaEditor editor) {
	this(editor.getEditorSite());
	fEditor= editor;
	setEnabled(SelectionConverter.canOperateOn(fEditor));
}
 
Example 16
Source File: InlineTempAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Note: This constructor is for internal use only. Clients should not call this constructor.
 *
 * @param editor the java editor
 *
 * @noreference This constructor is not intended to be referenced by clients.
 */
public InlineTempAction(JavaEditor editor) {
	this(editor.getEditorSite());
	fEditor= editor;
	setEnabled(SelectionConverter.canOperateOn(fEditor));
}
 
Example 17
Source File: UseSupertypeAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Note: This constructor is for internal use only. Clients should not call this constructor.
 * @param editor the java editor
 *
 * @noreference This constructor is not intended to be referenced by clients.
 */
public UseSupertypeAction(JavaEditor editor) {
	this(editor.getEditorSite());
	fEditor= editor;
	setEnabled(SelectionConverter.canOperateOn(fEditor));
}
 
Example 18
Source File: SelfEncapsulateFieldAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Note: This constructor is for internal use only. Clients should not call this constructor.
 *
 * @param editor the java editor
 *
 * @noreference This constructor is not intended to be referenced by clients.
 */
public SelfEncapsulateFieldAction(JavaEditor editor) {
	this(editor.getEditorSite());
	fEditor= editor;
	setEnabled(SelectionConverter.canOperateOn(fEditor));
}
 
Example 19
Source File: OpenAttachedJavadocAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Note: This constructor is for internal use only. Clients should not call this constructor.
 * 
 * @param editor the Java editor
 * @noreference This constructor is not intended to be referenced by clients.
 */
public OpenAttachedJavadocAction(JavaEditor editor) {
	this(editor.getEditorSite());
	fEditor= editor;
	setEnabled(SelectionConverter.canOperateOn(fEditor));
}
 
Example 20
Source File: FindOccurrencesInFileAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Note: This constructor is for internal use only. Clients should not call this constructor.
 * @param editor the Java editor
 *
 * @noreference This constructor is not intended to be referenced by clients.
 */
public FindOccurrencesInFileAction(JavaEditor editor) {
	this(editor.getEditorSite());
	fEditor= editor;
	setEnabled(getEditorInput(editor) != null);
}