Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2000, 2006 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at Contributors: IBM Corporation - initial API and implementation /
package org.eclipse.ant.internal.ui.editor.actions;
public class OpenDeclarationAction extends OpenAction {
	private AntEditor fEditor;
	public OpenDeclarationAction(AntEditor antEditor) {
		IHandlerService handlerServer= (IHandlerServiceantEditor.getSite().getService(IHandlerService.class);
        handlerServer.activateHandler(.new ActionHandler(this));
		setText(AntEditorActionMessages.getString("OpenDeclarationAction.0"));  //$NON-NLS-1$
		setDescription(AntEditorActionMessages.getString("OpenDeclarationAction.1")); //$NON-NLS-1$
		setToolTipText(AntEditorActionMessages.getString("OpenDeclarationAction.1")); //$NON-NLS-1$
	/* (non-Javadoc)
	 * @see org.eclipse.jface.action.IAction#run()
	public void run() {
		if ( == null) {
	/* (non-Javadoc)
	 * @see org.eclipse.jdt.ui.actions.SelectionDispatchAction#selectionChanged(org.eclipse.jface.text.ITextSelection)
	public void selectionChanged(ITextSelection selection) {
		setEnabled( != null);
	public void setEditor(AntEditor editor) {
New to GrepCode? Check out our FAQ X