Package org.eclipse.ecf.internal.example.collab.ui

Examples of org.eclipse.ecf.internal.example.collab.ui.EditorHelper


  public void open() {
    final IWorkbench wb = PlatformUI.getWorkbench();
    final IWorkbenchWindow ww = wb.getActiveWorkbenchWindow();
    final IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(fileName));
    if (file != null) {
      final EditorHelper eh = new EditorHelper(ww);
      try {
        eh.openAndSelectForFile(file, (selection == null) ? 0 : selection.getStart(), (selection == null) ? 0 : (selection.getEnd() - selection.getStart()));
      } catch (final Exception e) {
        ClientPlugin.log(Messages.EclipseCollabHyperlink_EXCEPTION_OPEN_EDITOR, e);
      }
    } else {
      MessageDialog.openInformation(ww.getShell(), Messages.EclipseCollabHyperlink_EXCEPTION_OPEN_EDITOR_TITLE, NLS.bind(Messages.EclipseCollabHyperlink_MESSAGE_EXCEPTION_OPEN_EDITOR, fileName));
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.internal.example.collab.ui.EditorHelper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.