Examples of ICamelEditorInput


Examples of org.fusesource.ide.camel.model.io.ICamelEditorInput

      }
    }

    // if we have a remote camel input then we need to write it back to the remote context
    if (designEditor.getEditorInput() != null && designEditor.getEditorInput() instanceof ICamelEditorInput) {
      ICamelEditorInput camelInput = (ICamelEditorInput) designEditor.getEditorInput();
      IDocument doc = getDocument();
      if (doc != null) {
        String xml = doc.get();
        camelInput.save(xml);
      }
    } else {   
      // then we call the save method of the text editor
      sourceEditor.doSave(monitor);
    }
View Full Code Here

Examples of org.fusesource.ide.camel.model.io.ICamelEditorInput

  private void createSourcePage(int index) {
    try {
      sourceEditor = new StructuredTextEditor();
      IEditorInput editorInput = getEditorInput();
      if (editorInput instanceof ICamelEditorInput) {
        ICamelEditorInput camelEditorInput = (ICamelEditorInput) editorInput;
        editorInput = camelEditorInput.getFileEditorInput();
      }
      addPage(index, sourceEditor, editorInput);
      setPageText(index, Messages.editorSourcePageTitle);
    } catch (PartInitException e) {
      ErrorDialog.openError(getSite().getShell(),
View Full Code Here

Examples of org.fusesource.ide.camel.model.io.ICamelEditorInput

  public IFileEditorInput asFileEditorInput(IEditorInput input) {
    if (input instanceof IFileEditorInput) {
      return (IFileEditorInput) input;
    } else if (input instanceof ICamelEditorInput) {
      ICamelEditorInput camelEditorInput = (ICamelEditorInput) input;
      IEditorInput fileEditorInput = camelEditorInput.getFileEditorInput();
      if (fileEditorInput instanceof IFileEditorInput) {
        return (IFileEditorInput) fileEditorInput;
      } else if (fileEditorInput instanceof FileStoreEditorInput) {
        FileStoreEditorInput fsei = (FileStoreEditorInput)fileEditorInput;
        return new FileEditorInput((IFile)input.getAdapter(IFile.class));
View Full Code Here

Examples of org.fusesource.ide.camel.model.io.ICamelEditorInput

  public IRemoteCamelEditorInput asRemoteCamelEditorInput(IEditorInput input) {
    if (input instanceof IRemoteCamelEditorInput) {
      return (IRemoteCamelEditorInput) input;
    } else if (input instanceof ICamelEditorInput) {
      ICamelEditorInput camelEditorInput = (ICamelEditorInput) input;
      IEditorInput fileEditorInput = camelEditorInput.getFileEditorInput();
      if (fileEditorInput instanceof IRemoteCamelEditorInput) {
        return (IRemoteCamelEditorInput) fileEditorInput;
      }
    } else if (input instanceof IURIEditorInput) {
      final IURIEditorInput uriInput = (IURIEditorInput) input;
View Full Code Here

Examples of org.fusesource.ide.camel.model.io.ICamelEditorInput

    try {
      if (editorInput instanceof IFileEditorInput) {
        IFile file = ((IFileEditorInput) editorInput).getFile();
        loadModelFromFile(file);
      } else if (editorInput instanceof ICamelEditorInput) {
        ICamelEditorInput camelInput = (ICamelEditorInput) editorInput;
        editor.onInputLoading(camelInput);
        this.setModel(camelInput.loadModel());
      } else if (editorInput instanceof IURIEditorInput) {
        editor.onInputLoading(editorInput);
        IURIEditorInput uriInput = (IURIEditorInput) editorInput;
        URI uri = uriInput.getURI();
        URL url = uri.toURL();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.