Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui
Class OpenAndLinkWithEditorHelper

java.lang.Object
  extended by 
org.eclipse.ui.OpenAndLinkWithEditorHelper

public abstract class OpenAndLinkWithEditorHelper
extends Object

Helper for opening editors on the viewer's selection and link the selection with the editor.

Since:
3.5

Constructor Summary
OpenAndLinkWithEditorHelper ( StructuredViewer viewer)
          Creates a new helper for the given viewer.
 
Method Summary
protected abstract  void activate ( ISelection selection)
          Tells to activate the editor that is open on the given selection.
 void dispose ()
          Disposes this helper.
protected abstract  void linkToEditor ( ISelection selection)
          Tells to link the given selection to the editor that is open on the given selection but does nothing if no matching editor can be found.
protected abstract  void open ( ISelection selection, boolean activate)
          Tells to open an editor for the given selection.
 void setLinkWithEditor (boolean enabled)
          Sets whether editor that corresponds to the viewer's selection should be brought to front.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenAndLinkWithEditorHelper

public OpenAndLinkWithEditorHelper(
StructuredViewer viewer)
Creates a new helper for the given viewer.

Parameters:
viewer - the viewer
Method Detail

setLinkWithEditor

public void setLinkWithEditor(boolean enabled)
Sets whether editor that corresponds to the viewer's selection should be brought to front.

Parameters:
enabled - true to enable, false to disable

dispose

public void dispose()
Disposes this helper.

Clients only need to call this method if their viewer has a longer life-cycle than this helper.


activate

protected abstract void activate(
ISelection selection)
Tells to activate the editor that is open on the given selection.

Note: The implementation must not open a new editor.

Parameters:
selection - the viewer's selection
Since:
3.5

open

protected abstract void open(
ISelection selection,
                             boolean activate)
Tells to open an editor for the given selection.

Parameters:
selection - the viewer's selection
activate - true if the editor should be activated, false otherwise
Since:
3.5

linkToEditor

protected abstract void linkToEditor(
ISelection selection)
Tells to link the given selection to the editor that is open on the given selection but does nothing if no matching editor can be found.

The common implementation brings that editor to front but more advanced implementations may also select the given selection inside the editor.

Note: The implementation must not open a new editor.

Parameters:
selection - the viewer's selection
Since:
3.5

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire