Java 类org.eclipse.ui.dialogs.SaveAsDialog 实例源码

项目:neoscada    文件:ProtocolEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs ()
{
    SaveAsDialog saveAsDialog = new SaveAsDialog ( getSite ().getShell () );
    saveAsDialog.open ();
    IPath path = saveAsDialog.getResult ();
    if ( path != null )
    {
        IFile file = ResourcesPlugin.getWorkspace ().getRoot ().getFile ( path );
        if ( file != null )
        {
            doSaveAs ( URI.createPlatformResourceURI ( file.getFullPath ().toString (), true ), new FileEditorInput ( file ) );
        }
    }
}
项目:neoscada    文件:ChartEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated
 */
@Override
public void doSaveAs ()
{
    final SaveAsDialog saveAsDialog = new SaveAsDialog ( getSite ().getShell () );
    saveAsDialog.open ();
    final IPath path = saveAsDialog.getResult ();
    if ( path != null )
    {
        final IFile file = ResourcesPlugin.getWorkspace ().getRoot ().getFile ( path );
        if ( file != null )
        {
            doSaveAs ( URI.createPlatformResourceURI ( file.getFullPath ()
                    .toString (), true ), new FileEditorInput ( file ) );
        }
    }
}
项目:neoscada    文件:DetailViewEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs ()
{
    SaveAsDialog saveAsDialog = new SaveAsDialog ( getSite ().getShell () );
    saveAsDialog.open ();
    IPath path = saveAsDialog.getResult ();
    if ( path != null )
    {
        IFile file = ResourcesPlugin.getWorkspace ().getRoot ().getFile ( path );
        if ( file != null )
        {
            doSaveAs ( URI.createPlatformResourceURI ( file.getFullPath ().toString (), true ), new FileEditorInput ( file ) );
        }
    }
}
项目:neoscada    文件:VisualInterfaceEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs ()
{
    SaveAsDialog saveAsDialog = new SaveAsDialog ( getSite ().getShell () );
    saveAsDialog.open ();
    IPath path = saveAsDialog.getResult ();
    if ( path != null )
    {
        IFile file = ResourcesPlugin.getWorkspace ().getRoot ().getFile ( path );
        if ( file != null )
        {
            doSaveAs ( URI.createPlatformResourceURI ( file.getFullPath ().toString (), true ), new FileEditorInput ( file ) );
        }
    }
}
项目:neoscada    文件:DeploymentEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs ()
{
    SaveAsDialog saveAsDialog = new SaveAsDialog ( getSite ().getShell () );
    saveAsDialog.open ();
    IPath path = saveAsDialog.getResult ();
    if ( path != null )
    {
        IFile file = ResourcesPlugin.getWorkspace ().getRoot ().getFile ( path );
        if ( file != null )
        {
            doSaveAs ( URI.createPlatformResourceURI ( file.getFullPath ().toString (), true ), new FileEditorInput ( file ) );
        }
    }
}
项目:neoscada    文件:SetupEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs ()
{
    SaveAsDialog saveAsDialog = new SaveAsDialog ( getSite ().getShell () );
    saveAsDialog.open ();
    IPath path = saveAsDialog.getResult ();
    if ( path != null )
    {
        IFile file = ResourcesPlugin.getWorkspace ().getRoot ().getFile ( path );
        if ( file != null )
        {
            doSaveAs ( URI.createPlatformResourceURI ( file.getFullPath ().toString (), true ), new FileEditorInput ( file ) );
        }
    }
}
项目:neoscada    文件:ProfileEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs ()
{
    SaveAsDialog saveAsDialog = new SaveAsDialog ( getSite ().getShell () );
    saveAsDialog.open ();
    IPath path = saveAsDialog.getResult ();
    if ( path != null )
    {
        IFile file = ResourcesPlugin.getWorkspace ().getRoot ().getFile ( path );
        if ( file != null )
        {
            doSaveAs ( URI.createPlatformResourceURI ( file.getFullPath ().toString (), true ), new FileEditorInput ( file ) );
        }
    }
}
项目:neoscada    文件:OsgiEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs ()
{
    SaveAsDialog saveAsDialog = new SaveAsDialog ( getSite ().getShell () );
    saveAsDialog.open ();
    IPath path = saveAsDialog.getResult ();
    if ( path != null )
    {
        IFile file = ResourcesPlugin.getWorkspace ().getRoot ().getFile ( path );
        if ( file != null )
        {
            doSaveAs ( URI.createPlatformResourceURI ( file.getFullPath ().toString (), true ), new FileEditorInput ( file ) );
        }
    }
}
项目:neoscada    文件:WorldEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs ()
{
    SaveAsDialog saveAsDialog = new SaveAsDialog ( getSite ().getShell () );
    saveAsDialog.open ();
    IPath path = saveAsDialog.getResult ();
    if ( path != null )
    {
        IFile file = ResourcesPlugin.getWorkspace ().getRoot ().getFile ( path );
        if ( file != null )
        {
            doSaveAs ( URI.createPlatformResourceURI ( file.getFullPath ().toString (), true ), new FileEditorInput ( file ) );
        }
    }
}
项目:neoscada    文件:MemoryEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs ()
{
    SaveAsDialog saveAsDialog = new SaveAsDialog ( getSite ().getShell () );
    saveAsDialog.open ();
    IPath path = saveAsDialog.getResult ();
    if ( path != null )
    {
        IFile file = ResourcesPlugin.getWorkspace ().getRoot ().getFile ( path );
        if ( file != null )
        {
            doSaveAs ( URI.createPlatformResourceURI ( file.getFullPath ().toString (), true ), new FileEditorInput ( file ) );
        }
    }
}
项目:neoscada    文件:RecipeEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs ()
{
    SaveAsDialog saveAsDialog = new SaveAsDialog ( getSite ().getShell () );
    saveAsDialog.open ();
    IPath path = saveAsDialog.getResult ();
    if ( path != null )
    {
        IFile file = ResourcesPlugin.getWorkspace ().getRoot ().getFile ( path );
        if ( file != null )
        {
            doSaveAs ( URI.createPlatformResourceURI ( file.getFullPath ().toString (), true ), new FileEditorInput ( file ) );
        }
    }
}
项目:neoscada    文件:InfrastructureEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs ()
{
    SaveAsDialog saveAsDialog = new SaveAsDialog ( getSite ().getShell () );
    saveAsDialog.open ();
    IPath path = saveAsDialog.getResult ();
    if ( path != null )
    {
        IFile file = ResourcesPlugin.getWorkspace ().getRoot ().getFile ( path );
        if ( file != null )
        {
            doSaveAs ( URI.createPlatformResourceURI ( file.getFullPath ().toString (), true ), new FileEditorInput ( file ) );
        }
    }
}
项目:neoscada    文件:SecurityEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs ()
{
    SaveAsDialog saveAsDialog = new SaveAsDialog ( getSite ().getShell () );
    saveAsDialog.open ();
    IPath path = saveAsDialog.getResult ();
    if ( path != null )
    {
        IFile file = ResourcesPlugin.getWorkspace ().getRoot ().getFile ( path );
        if ( file != null )
        {
            doSaveAs ( URI.createPlatformResourceURI ( file.getFullPath ().toString (), true ), new FileEditorInput ( file ) );
        }
    }
}
项目:neoscada    文件:GlobalizeEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs ()
{
    SaveAsDialog saveAsDialog = new SaveAsDialog ( getSite ().getShell () );
    saveAsDialog.open ();
    IPath path = saveAsDialog.getResult ();
    if ( path != null )
    {
        IFile file = ResourcesPlugin.getWorkspace ().getRoot ().getFile ( path );
        if ( file != null )
        {
            doSaveAs ( URI.createPlatformResourceURI ( file.getFullPath ().toString (), true ), new FileEditorInput ( file ) );
        }
    }
}
项目:neoscada    文件:ComponentEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs ()
{
    SaveAsDialog saveAsDialog = new SaveAsDialog ( getSite ().getShell () );
    saveAsDialog.open ();
    IPath path = saveAsDialog.getResult ();
    if ( path != null )
    {
        IFile file = ResourcesPlugin.getWorkspace ().getRoot ().getFile ( path );
        if ( file != null )
        {
            doSaveAs ( URI.createPlatformResourceURI ( file.getFullPath ().toString (), true ), new FileEditorInput ( file ) );
        }
    }
}
项目:neoscada    文件:ItemEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs ()
{
    SaveAsDialog saveAsDialog = new SaveAsDialog ( getSite ().getShell () );
    saveAsDialog.open ();
    IPath path = saveAsDialog.getResult ();
    if ( path != null )
    {
        IFile file = ResourcesPlugin.getWorkspace ().getRoot ().getFile ( path );
        if ( file != null )
        {
            doSaveAs ( URI.createPlatformResourceURI ( file.getFullPath ().toString (), true ), new FileEditorInput ( file ) );
        }
    }
}
项目:neoscada    文件:ConfigurationEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs ()
{
    SaveAsDialog saveAsDialog = new SaveAsDialog ( getSite ().getShell () );
    saveAsDialog.open ();
    IPath path = saveAsDialog.getResult ();
    if ( path != null )
    {
        IFile file = ResourcesPlugin.getWorkspace ().getRoot ().getFile ( path );
        if ( file != null )
        {
            doSaveAs ( URI.createPlatformResourceURI ( file.getFullPath ().toString (), true ), new FileEditorInput ( file ) );
        }
    }
}
项目:Hydrograph    文件:ELTGraphicalEditor.java   
private IFile opeSaveAsDialog() {
    logger.debug("opeSaveAsDialog - Opening SaveAs dialog box.");
    SaveAsDialog obj = new SaveAsDialog(Display.getDefault().getActiveShell());
    IFile file=null;
    if (getEditorInput().getName().endsWith(".job"))
    {
        obj.setOriginalName(getEditorInput().getName());
    }
    else
        obj.setOriginalName(getEditorInput().getName() + ".job");
    oldFileName=getEditorInput().getName();
    obj.open();
    if (obj.getReturnCode() == 0) {
        validateLengthOfJobName(obj);
    }
    if(obj.getResult()!=null&&obj.getReturnCode()!=1) {
        IPath filePath = obj.getResult().removeFileExtension().addFileExtension("job");
        file= ResourcesPlugin.getWorkspace().getRoot().getFile(filePath);
    }

    return file;
}
项目:Hydrograph    文件:ELTGraphicalEditor.java   
/**
 * 
 * Validates length of job name
 * 
 * @param {@link SaveAsDialog}
 */
public void validateLengthOfJobName(SaveAsDialog saveAsDialog) {
    String jobName=saveAsDialog.getResult().removeFileExtension().lastSegment();
    while(jobName.length()>50)
    {
        jobName=saveAsDialog.getResult().removeFileExtension().lastSegment();
        if(jobName.length()>50)
        {
            MessageBox messageBox = new MessageBox(new Shell(), SWT.ICON_ERROR | SWT.OK);
            messageBox.setText("Error");
            messageBox.setMessage("File Name Too Long");
            if(messageBox.open()==SWT.OK)
            {
                saveAsDialog.setOriginalName(jobName+".job");
                IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(saveAsDialog.getResult());
                saveAsDialog.setOriginalFile(file);
                saveAsDialog.open();
                if(saveAsDialog.getReturnCode()==1)
                    break;
            }
        }
    }
}
项目:subclipse    文件:SVNPropertySaveAction.java   
protected void execute(IAction action)
    throws InvocationTargetException, InterruptedException {
    ISVNProperty svnProperty = getSelectedSvnProperties()[0];

    SaveAsDialog dialog = new SaveAsDialog(getShell());

    if (dialog.open() != SaveAsDialog.OK)
        return;

    IFile file =
        ResourcesPlugin.getWorkspace().getRoot().getFile(
            dialog.getResult());
    try {
        ByteArrayInputStream is =
            new ByteArrayInputStream(svnProperty.getData());
        file.create(is, true, null);
    } catch (CoreException e) {
        throw new InvocationTargetException(e);
    }
}
项目:depan    文件:ViewEditor.java   
@Override
public void doSaveAs() {
  SaveAsDialog saveas = new SaveAsDialog(getSite().getShell());
  IFile saveAs = getSaveAsFile();
  saveas.setOriginalFile(saveAs);
  saveas.setOriginalName(saveAs.getName());
  if (saveas.open() != SaveAsDialog.OK) {
    return;
  }

  // get the file relatively to the workspace.
  IFile saveFile = calcViewFile(saveas.getResult());
  // TODO: set up a progress monitor
  saveFile(saveFile, null, "saveAs");

  baseName = buildFileInputBaseName(saveFile);
  setPartName(saveFile.getName());

  FileEditorInput effInput = new FileEditorInput(saveFile);
  setInputWithNotify(effInput);
}
项目:depan    文件:RelationDisplayEditor.java   
@Override
public void doSaveAs() {
  SaveAsDialog saveas = new SaveAsDialog(getSite().getShell());
  saveas.setOriginalFile(file);
  saveas.setOriginalName(propInfo.getName());
  if (saveas.open() != SaveAsDialog.OK) {
    return;
  }

  // get the file relatively to the workspace.
  IFile saveFile = WorkspaceTools.calcViewFile(
      saveas.getResult(), RelationSetResources.EXTENSION);
  // TODO: set up a progress monitor
  file = saveFile;
  handleDocumentChange();
  persistDocument(null);
}
项目:depan    文件:EdgeMatcherEditor.java   
@Override
public void doSaveAs() {
  SaveAsDialog saveas = new SaveAsDialog(getSite().getShell());
  saveas.setOriginalFile(file);
  saveas.setOriginalName(matcherInfo.getName());
  if (saveas.open() != SaveAsDialog.OK) {
    return;
  }

  // get the file relatively to the workspace.
  IFile saveFile = WorkspaceTools.calcViewFile(
      saveas.getResult(), GraphEdgeMatcherResources.EXTENSION);
  // TODO: set up a progress monitor
  file = saveFile;
  handleDocumentChange();
  persistDocument(null);
}
项目:depan    文件:RelationSetDescriptorEditor.java   
@Override
public void doSaveAs() {
  SaveAsDialog saveas = new SaveAsDialog(getSite().getShell());
  saveas.setOriginalFile(file);
  saveas.setOriginalName(relSetInfo.getName());
  if (saveas.open() != SaveAsDialog.OK) {
    return;
  }

  // get the file relatively to the workspace.
  IFile saveFile = WorkspaceTools.calcViewFile(
      saveas.getResult(), RelationSetResources.EXTENSION);
  // TODO: set up a progress monitor
  file = saveFile;
  handleDocumentChange();
  persistDocument(null);
}
项目:PDFReporter-Studio    文件:ExportDataAdapterAction.java   
@Override
public void run() {
    TreeSelection s = (TreeSelection) treeViewer.getSelection();
    TreePath[] p = s.getPaths();

    for (int i = 0; i < p.length; i++) {
        Object obj = p[i].getLastSegment();
        if (obj instanceof MDataAdapter) {
            SaveAsDialog saveAsDialog = new SaveAsDialog(Display.getDefault().getActiveShell());
            saveAsDialog.setOriginalName(((MDataAdapter) obj).getValue().getName().replace(" ", "") + ".xml"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
            saveAsDialog.open();
            IPath path = saveAsDialog.getResult();
            if (path != null)
                saveFile(obj, path);
        }
    }
}
项目:PDFReporter-Studio    文件:DataAdapterEditorPart.java   
@Override
public void doSaveAs() {
    SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
    saveAsDialog.setOriginalFile(((FileEditorInput) getEditorInput()).getFile());
    saveAsDialog.open();
    IPath path = saveAsDialog.getResult();
    if (path != null) {
        IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
        if (file != null) {
            IFileEditorInput modelFile = new FileEditorInput(file);
            setInputWithNotify(modelFile);
            setInput(modelFile);
            setPartName(file.getName());
            IProgressMonitor progressMonitor = getEditorSite().getActionBars().getStatusLineManager().getProgressMonitor();
            doSave(progressMonitor);
        }
    }
}
项目:APICloud-Studio    文件:SVNPropertySaveAction.java   
protected void execute(IAction action)
    throws InvocationTargetException, InterruptedException {
    ISVNProperty svnProperty = getSelectedSvnProperties()[0];

    SaveAsDialog dialog = new SaveAsDialog(getShell());

    if (dialog.open() != SaveAsDialog.OK)
        return;

    IFile file =
        ResourcesPlugin.getWorkspace().getRoot().getFile(
            dialog.getResult());
    try {
        ByteArrayInputStream is =
            new ByteArrayInputStream(svnProperty.getData());
        file.create(is, true, null);
    } catch (CoreException e) {
        throw new InvocationTargetException(e);
    }
}
项目:OpenSPIFe    文件:ChartEditor.java   
@Override
public void doSaveAs() {
    URI chartURI = getChartURI(true);
    SaveAsDialog dlg = new SaveAsDialog(getSite().getShell());
    dlg.setOriginalFile(EMFUtils.getFile(chartURI));
    if (dlg.open() == Window.OK) {
        IPath path = dlg.getResult();
        URI newChartURI = EMFUtils.getURI(path);
        try {
            Resource resource = timelineModel.eResource();
            resource.setURI(newChartURI);
            resource.save(null);
            dirtyMonitor.resetDirty();
            setChartURI(newChartURI);
            setInput(new FileEditorInput(EMFUtils.getFile(newChartURI)));
            setPartName(newChartURI.lastSegment());
        } catch (IOException e) {
            LogUtil.error(e);
        }
    }
}
项目:Archie-Smart-IDE    文件:TimEditor.java   
/**
 * 
 */
@Override
public void doSaveAs()
{
    SaveAsDialog dialog = new SaveAsDialog(getSite().getShell());
    dialog.setOriginalFile(((IFileEditorInput) getEditorInput()).getFile());
    dialog.open();

    IPath path = dialog.getResult();
    if (path == null) // user clicked cancel
        return;

    IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
    super.setInput(new FileEditorInput(file));
    doSave(null);
    setPartName(file.getName());
}
项目:emf.utils    文件:ReadOnlyEcoreEditor.java   
@Override
public void doSaveAs() {
    SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
    saveAsDialog.create();
    saveAsDialog.setMessage(EcoreEditorPlugin.INSTANCE.getString("_UI_SaveAs_message"));
    saveAsDialog.open();
    IPath path = saveAsDialog.getResult();
    if (path != null) {
        IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
        if (file != null) {
            ResourceSet resourceSet = editingDomain.getResourceSet();
            Resource currentResource = resourceSet.getResources().get(0);
            URI newURI = URI.createPlatformResourceURI(file.getFullPath().toString(), true);

            Resource newResource = resourceSet.createResource(newURI);
            newResource.getContents().addAll(EcoreUtil.copyAll(currentResource.getContents()));
            resourceSet.getResources().remove(0);
            resourceSet.getResources().move(0, newResource);

            IFileEditorInput modelFile = new FileEditorInput(file);
            setInputWithNotify(modelFile);
            setPartName(file.getName());
            doSave(getActionBars().getStatusLineManager().getProgressMonitor());
        }
    }
}
项目:cuina    文件:TerrainEditor.java   
@Override
public void doSaveAs()
{
    SaveAsDialog dialog = new SaveAsDialog(getEditorSite().getShell());
    dialog.setOriginalFile(file);
    dialog.setTitle("Speichern unter");
    int result = dialog.open();
    if (result == Dialog.OK) try
    {
        SerializationManager.save(map, ResourcesPlugin.getWorkspace().getRoot().getFile(dialog.getResult()));
        setDirty(false);
    }
    catch(ResourceException e)
    {
        showError("Datei konnte nicht gespeichert werden.", e);
    }
}
项目:smarthome-cep-demonstrator    文件:SmarthomeEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
 * @generated
 */
   @Override
   public void doSaveAs() {
    SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
    saveAsDialog.open();
    IPath path = saveAsDialog.getResult();
    if (path != null) {
        IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
        if (file != null) {
            doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
        }
    }
}
项目:SimQRI    文件:MetamodelEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs() {
    SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
    saveAsDialog.open();
    IPath path = saveAsDialog.getResult();
    if (path != null) {
        IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
        if (file != null) {
            doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
        }
    }
}
项目:gemoc-studio-modeldebugging    文件:TracingannotationsEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs() {
    SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
    saveAsDialog.open();
    IPath path = saveAsDialog.getResult();
    if (path != null) {
        IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
        if (file != null) {
            doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
        }
    }
}
项目:gemoc-studio    文件:GexpressionsEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs() {
    SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
    saveAsDialog.open();
    IPath path = saveAsDialog.getResult();
    if (path != null) {
        IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
        if (file != null) {
            doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
        }
    }
}
项目:gemoc-studio    文件:FsmEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs() {
    SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
    saveAsDialog.open();
    IPath path = saveAsDialog.getResult();
    if (path != null) {
        IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
        if (file != null) {
            doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
        }
    }
}
项目:time4sys    文件:NfpEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs() {
    SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
    saveAsDialog.open();
    IPath path = saveAsDialog.getResult();
    if (path != null) {
        IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
        if (file != null) {
            doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
        }
    }
}
项目:time4sys    文件:GqamEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs() {
    SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
    saveAsDialog.open();
    IPath path = saveAsDialog.getResult();
    if (path != null) {
        IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
        if (file != null) {
            doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
        }
    }
}
项目:time4sys    文件:TraceEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs() {
    SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
    saveAsDialog.open();
    IPath path = saveAsDialog.getResult();
    if (path != null) {
        IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
        if (file != null) {
            doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
        }
    }
}
项目:time4sys    文件:AnalysisEditor.java   
/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void doSaveAs() {
    SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
    saveAsDialog.open();
    IPath path = saveAsDialog.getResult();
    if (path != null) {
        IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
        if (file != null) {
            doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
        }
    }
}