Package org.eclipse.ui.editors.text

Examples of org.eclipse.ui.editors.text.ILocationProvider


    super.createActions();

    // StructuredTextEditor Action - toggle breakpoints
    IAction action = new ToggleBreakpointAction(this, getVerticalRuler()) {
      protected String getContentType(IDocument document) {
        ILocationProvider provider = (ILocationProvider) getEditorInput().getAdapter(ILocationProvider.class);
        if (provider != null) {
          IPath location = provider.getPath(getEditorInput());
          return detectContentType(location).getId();
        }
        else if (getEditorInput() instanceof IPathEditorInput) {
          IPath location = ((IPathEditorInput) getEditorInput()).getPath();
          return detectContentType(location).getId();
View Full Code Here


    return false;
  }

  public Object getAdapter(Class adapter) {
    if (adapter == ILocationProvider.class)
      return new ILocationProvider() {

        public IPath getPath(Object element) {
          return new Path(tempFile.getAbsolutePath());
        }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.editors.text.ILocationProvider

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.