当前位置: 首页>>代码示例>>Java>>正文


Java StructuredTextEditor类代码示例

本文整理汇总了Java中org.eclipse.wst.sse.ui.StructuredTextEditor的典型用法代码示例。如果您正苦于以下问题:Java StructuredTextEditor类的具体用法?Java StructuredTextEditor怎么用?Java StructuredTextEditor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


StructuredTextEditor类属于org.eclipse.wst.sse.ui包,在下文中一共展示了StructuredTextEditor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addPages

import org.eclipse.wst.sse.ui.StructuredTextEditor; //导入依赖的package包/类
@Override
protected void addPages() {
	try {
		this.xmlEditor=new StructuredTextEditor();
		graphicalEditorPage=new GraphicalEditorPage(xmlEditor);
		this.addPage(0, graphicalEditorPage,this.getEditorInput());
		this.setPageText(0, "流程图");
		this.addPage(1, xmlEditor,this.getEditorInput());
		deploymentPage=new DeploymentPage(this,graphicalEditorPage.getGraphicalViewer(),"部署");
		this.addPage(2, deploymentPage);
		this.setPageText(1, "源码");
		this.setActivePage(0);
		this.setPartName(this.getEditorInput().getName());
	} catch (PartInitException e) {
		e.printStackTrace();
	}
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:18,代码来源:Jbpm4Designer.java

示例2: setActivePage

import org.eclipse.wst.sse.ui.StructuredTextEditor; //导入依赖的package包/类
@Override
	public void setActivePage(IEditorPart activeEditor) {
	IActionBars actionBars = getActionBars();
	if (actionBars == null) return;
	actionBars.clearGlobalActionHandlers();
	if (activeEditor instanceof GraphicalEditorPage) {
		addGraphicalEditorActions((GraphicalEditorPage) activeEditor, actionBars);
	} else if (activeEditor instanceof StructuredTextEditor) {
		addXmlEditorActions((StructuredTextEditor) activeEditor, actionBars);
	}
	actionBars.updateActionBars();
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:13,代码来源:EditorActionBarContributor.java

示例3: addXmlEditorActions

import org.eclipse.wst.sse.ui.StructuredTextEditor; //导入依赖的package包/类
private void addXmlEditorActions(StructuredTextEditor activeEditor,
		IActionBars actionBars) {	
	// set the global actions of jpdl editor are unable.
	String[] keys = actionMap.keySet().toArray(new String[actionMap.keySet().size()]);
	for (int i = 0; i < keys.length; i++) {
		actionBars.setGlobalActionHandler(keys[i], null);
	}
	//set the global actions to xml editor global action
	for (int i = 0; i < WORKBENCH_ACTION_IDS.length; i++) {
		actionBars.setGlobalActionHandler(WORKBENCH_ACTION_IDS[i],activeEditor.getAction(TEXTEDITOR_ACTION_IDS[i]));
	}
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:13,代码来源:EditorActionBarContributor.java

示例4: createPage0

import org.eclipse.wst.sse.ui.StructuredTextEditor; //导入依赖的package包/类
void createPage0() {
	try {
		editor = new StructuredTextEditor();
		int index = addPage(editor, getEditorInput());
		setPageText(index, editor.getTitle());
	}
	catch (PartInitException e) {
		ErrorDialog.openError(getSite().getShell(), "Error creating nested text editor", null, e.getStatus());
	}
}
 
开发者ID:SAP,项目名称:hybris-commerce-eclipse-plugin,代码行数:11,代码来源:TSVEditor.java

示例5: addPages

import org.eclipse.wst.sse.ui.StructuredTextEditor; //导入依赖的package包/类
@Override
protected void addPages() {
	this.jsonEditor = new StructuredTextEditor();
	jsonEditor.setEditorPart(this);
	try {
		// Add pages like overview, etc
		doAddPages();
		// Add source page
		jsonEditorIndex = addPage(jsonEditor, getEditorInput());
		setPageText(jsonEditorIndex, "Source");
	} catch (PartInitException e) {
		e.printStackTrace();
	}
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:15,代码来源:AbstractFormEditor.java

示例6: getActiveTextViewer

import org.eclipse.wst.sse.ui.StructuredTextEditor; //导入依赖的package包/类
/**
 * @return the active structured text viewer, or null
 */
public static StructuredTextViewer getActiveTextViewer() {
  // Need to get the workbench window from the UI thread
  final IWorkbenchWindow[] windowHolder = new IWorkbenchWindow[1];
  Display.getDefault().syncExec(new Runnable() {
    public void run() {
      windowHolder[0] = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    }
  });
 
  IWorkbenchWindow window = windowHolder[0];
  if (window == null) {
    return null;
  }
  
  IWorkbenchPage page = window.getActivePage();
  if (page == null) {
    return null;
  }

  IEditorPart editor = page.getActiveEditor();
  if (editor == null) {
    return null;
  }

  /*
   * TODO: change the following to use AdapterUtilities.getAdapter()
   * and either a) have GWTD register an adapter factory or b) add a direct
   * IAdaptable.getAdapter() call to AdapterUtilities.getAdapter().
   */
  StructuredTextEditor structuredEditor = (StructuredTextEditor) editor.getAdapter(StructuredTextEditor.class);
  if (structuredEditor == null) {
    return null;
  }

  return structuredEditor.getTextViewer();
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:40,代码来源:SseUtilities.java

示例7: createBPMN2Page

import org.eclipse.wst.sse.ui.StructuredTextEditor; //导入依赖的package包/类
private void createBPMN2Page() {
  try {
    bpmnEditor = new StructuredTextEditor();
    int index = addPage(bpmnEditor, getBPMN2EditorInput());
    setPageText(index, ActivitiMultiPageEditor.XML_PANE_TITLE);
  } catch (PartInitException e) {
    ErrorDialog.openError(getSite().getShell(), "Error creating nested Activiti BPMN2.0 editor", null, e.getStatus());
  }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:10,代码来源:ActivitiMultiPageEditor.java

示例8: createPageSource

import org.eclipse.wst.sse.ui.StructuredTextEditor; //导入依赖的package包/类
/**
 * Creates page 0 of the multi-page editor, which contains a text editor.
 */
void createPageSource() {
	try {
		editor = new StructuredTextEditor();
		int index = addPage(editor, getEditorInput());
		setPageText(index, "Source " + editor.getTitle());
		setPageImage(index, ResourceManager.getPluginImage("org.eclipse.ui", "/icons/full/etool16/editor_area.png"));
	} catch (PartInitException e) {
		ErrorDialog.openError(getSite().getShell(), "Error creating nested text editor", null, e.getStatus());
	}
}
 
开发者ID:ploys,项目名称:ecle,代码行数:14,代码来源:MBDEditor.java

示例9: createPage

import org.eclipse.wst.sse.ui.StructuredTextEditor; //导入依赖的package包/类
void createPage(final String inputString, final String title, final String tooltip) {
    try {
        if (title.equals(SyncopeView.TEMPLATE_FORMAT_HTML)) {
            editor = new HTMLEditor();
        } else {
            editor = new StructuredTextEditor(); 
        }
        int index = addPage(editor, (IEditorInput) new TemplateEditorInput(inputString, title, tooltip));
        setPageText(index, editor.getTitle());
    } catch (final PartInitException e) {
        ErrorDialog.openError(
            getSite().getShell(), ERROR_NESTED_EDITOR, null, e.getStatus());
    }
}
 
开发者ID:apache,项目名称:syncope,代码行数:15,代码来源:TemplateEditor.java

示例10: execute

import org.eclipse.wst.sse.ui.StructuredTextEditor; //导入依赖的package包/类
@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {
    final IWorkbenchWindow workbenchWindow = HandlerUtil.getActiveWorkbenchWindowChecked(event);

    final IWorkbenchPage activePage = workbenchWindow.getActivePage();
    if (null == activePage) {
        throw new ExecutionException("No active page found while executing " + event.getCommand().getId()); //$NON-NLS-1$
    }

    final IEditorPart activeEditor = activePage.getActiveEditor();
    if (null == activeEditor) {
        throw new ExecutionException("No active editor found while executing " + event.getCommand().getId()); //$NON-NLS-1$
    }

    if (!VisualForceMultiPageEditor.class.isInstance(activeEditor)) {
        throw new ExecutionException("Incorrect type for active editor found while executing " //$NON-NLS-1$
            + event.getCommand().getId()
            + ", expected " + VisualForceMultiPageEditor.class.getName() //$NON-NLS-1$
            + " found " + activeEditor.getClass().getName()); //$NON-NLS-1$
    }

    final VisualForceMultiPageEditor ourEditor = (VisualForceMultiPageEditor) activeEditor;
    final StructuredTextEditor textEditor = ourEditor.getTextEditor();
    if (null == textEditor) {
        throw new ExecutionException("No text editor found while executing " + event.getCommand().getId()); //$NON-NLS-1$
    }

    final SnippetDialog snippetDialog = new SnippetDialog(textEditor.getSite().getShell(), textEditor);
    snippetDialog.setSnippetDialogController(new SnippetDialogController());
    snippetDialog.setProject(ourEditor.getEditorInputFile().getProject());
    snippetDialog.open();

    return null;
}
 
开发者ID:forcedotcom,项目名称:idecore,代码行数:35,代码来源:MergeFieldsHandler.java

示例11: createMetadataPage

import org.eclipse.wst.sse.ui.StructuredTextEditor; //导入依赖的package包/类
protected void createMetadataPage() {
    metadataEditor = new StructuredTextEditor();
    metadataEditor.setEditorPart(this);
    if (metadataPropertyListener == null) {
        metadataPropertyListener = new PropertyListener();
    }
    metadataEditor.addPropertyListener(metadataPropertyListener);
}
 
开发者ID:forcedotcom,项目名称:idecore,代码行数:9,代码来源:VisualForceMultiPageEditor.java

示例12: createPage0

import org.eclipse.wst.sse.ui.StructuredTextEditor; //导入依赖的package包/类
/**
 * Creates Structured Twext Editot of the multi-page editor, which contains an HTML editor.
 */
void createPage0() {
	try {
		textEditor = new StructuredTextEditor();
		int index = addPage(textEditor, getEditorInput());
		setPageText(index, "Source");
		setPartName(textEditor.getTitle());
	} catch (PartInitException e) {
		ErrorDialog.openError(getSite().getShell(), "Error creating nested text editor", null, e.getStatus());
	}
}
 
开发者ID:eteration,项目名称:glassmaker,代码行数:14,代码来源:CardEditor.java

示例13: GraphicalEditorPage

import org.eclipse.wst.sse.ui.StructuredTextEditor; //导入依赖的package包/类
public GraphicalEditorPage(StructuredTextEditor xmlEditor){
	this.setEditDomain(new DefaultEditDomain(this));
	this.xmlEditor=xmlEditor;
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:5,代码来源:GraphicalEditorPage.java

示例14: createMetadataPage

import org.eclipse.wst.sse.ui.StructuredTextEditor; //导入依赖的package包/类
private void createMetadataPage() {
    metadataEditor = new StructuredTextEditor();
    metadataEditor.setEditorPart(this);
}
 
开发者ID:forcedotcom,项目名称:idecore,代码行数:5,代码来源:ApexCodeMultiPageEditor.java

示例15: getMetadataEditor

import org.eclipse.wst.sse.ui.StructuredTextEditor; //导入依赖的package包/类
public StructuredTextEditor getMetadataEditor() {
    return metadataEditor;
}
 
开发者ID:forcedotcom,项目名称:idecore,代码行数:4,代码来源:BaseComponentMultiPageEditorPart.java


注:本文中的org.eclipse.wst.sse.ui.StructuredTextEditor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。