Java 类org.eclipse.ui.ISaveablePart2 实例源码

项目:mytourbook    文件:TourDataEditorView.java   
@Override
public int promptToSaveOnClose() {

    int returnCode;

    if (_isTourDirty == false) {
        returnCode = ISaveablePart2.NO;
    }

    _isSavingInProgress = true;
    {
        if (saveTourWithValidation()) {
            returnCode = ISaveablePart2.NO;
        } else {
            returnCode = ISaveablePart2.CANCEL;
        }
    }
    _isSavingInProgress = false;

    return returnCode;
}
项目:VisualCenter    文件:BlockConfigFace.java   
@Override
public int promptToSaveOnClose() {
    if(this.dirty)
    {
        if(MessageDialog.openConfirm(getEditorSite().getShell(),
                "Warning", "Modification of '"+partName+"' is not saved, are you sure to close without saving?"))
        {
            return ISaveablePart2.NO;
        }
        else
        {
            return ISaveablePart2.CANCEL;
        }
    }

    return YES;
}
项目:SPELL    文件:ProcedureView.java   
/***************************************************************************
 * Called when the procedure view is about to close and the procedure status
 * implies that the procedure is not directly closeable
 **************************************************************************/
@Override
public int promptToSaveOnClose()
{
    Logger.debug("Procedure not directly closeable, asking user", Level.GUI, this);
    Shell shell = Display.getCurrent().getActiveShell();
    CloseProcDialog dialog = new CloseProcDialog(shell, getModel());
    int retcode = dialog.open();
    Logger.debug("User selection " + retcode, Level.GUI, this);
    if (retcode == IDialogConstants.CANCEL_ID)
    {
        Logger.debug("Cancelling closure", Level.GUI, this);
        return ISaveablePart2.CANCEL;
    }
    else if (retcode == CloseProcDialog.DETACH)
    {
        m_closeMode = ProcedureViewCloseMode.DETACH;
    }
    else if (retcode == CloseProcDialog.BACKGROUND)
    {
        m_closeMode = ProcedureViewCloseMode.BACKGROUND;
    }
    else if (retcode == CloseProcDialog.KILL)
    {
        m_closeMode = ProcedureViewCloseMode.KILL;
    }
    else if (retcode == CloseProcDialog.CLOSE)
    {
        m_closeMode = ProcedureViewCloseMode.CLOSE;
    }
    return ISaveablePart2.NO;
}
项目:SPELL    文件:ProcedureView.java   
/***************************************************************************
 * Update the closeable property
 **************************************************************************/
private void updateCloseable(ExecutorStatus status)
{
    // Set the closeable flag. If closeable is false, it means that
    // the procedure is in such status that it cannot be just unloaded
    // therefore the user must choose wether explicitly abort/kill it or
    // not.
    boolean notifyCloseable = false;
    if (status != ExecutorStatus.LOADED && status != ExecutorStatus.FINISHED && status != ExecutorStatus.ABORTED
            && status != ExecutorStatus.ERROR)
    {
        if (m_closeable)
            notifyCloseable = true;
        m_closeable = false;
    }
    else
    {
        if (!m_closeable)
            notifyCloseable = true;
        m_closeable = true;
    }
    // Notify changes only
    if (notifyCloseable)
    {
        firePropertyChange(ISaveablePart2.PROP_DIRTY);
    }
}
项目:VisualCenter    文件:BlockConfigFace.java   
@Override
public void doSave(IProgressMonitor monitor) {

    if(MessageDialog.openConfirm(getEditorSite().getShell(),
            "Question", "Are you sure to save?"))
    {
    }
    else
    {
        return;
    }

    try {
        this.orc.replace(this.oldBlock, this.newBlock, this.blockOutNames);
    } catch (RemoteException e) {
        e.printStackTrace();
        MessageDialog.openError(new Shell(), "Error", e.getMessage());
        return;
    }

    if(this.bInput != null && this.bInput.isChanged())
    {
        this.bInput.benchmark();
    }
    else
    {
        if(this.blockGroups!=null && !this.blockGroups.isEmpty())
        {
            int count = 0;
            int i = 0;
            while(i < count)
            {
                BlockInput blkinput = this.htGroupBInputs.get(this.blockGroups.get(i));
                blkinput.benchmark();
                i++;
            }
        }
    }

    this.dirty = false;
    firePropertyChange(ISaveablePart2.PROP_DIRTY);

}
项目:VisualCenter    文件:BlockConfigFace.java   
public void SetDirty(boolean dirty)
{
    this.dirty = dirty;
    firePropertyChange(ISaveablePart2.PROP_DIRTY);
}
项目:elexis-3-core    文件:WikiView.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:KonsDetailView.java   
@Override
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:BBSView.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:BestellView.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:RezepteView.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:KonsListe.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:SearchView.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:Artikeldetail.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:ArtikelSelektor.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:ArtikelView.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:PatHeuteView.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:KompendiumView.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:BriefAuswahl.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:AccountView.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:AccountListView.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:BillSummary.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:ODDBView.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:LeistungenView.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:CodeDetailView.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:DiagnosenView.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:LaborView.java   
/***********************************************************************************************
 * Die folgenden 6 Methoden implementieren das Interface ISaveablePart2 Wir benötigen das
 * Interface nur, um das Schliessen einer View zu verhindern, wenn die Perspektive fixiert ist.
 * Gibt es da keine einfachere Methode?
 */
@Override
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:PatientenListeView.java   
@Override
public int promptToSaveOnClose() {
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:KontakteView.java   
public int promptToSaveOnClose() {
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:PatientDetailView2.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:KontaktDetailView.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-base    文件:MesswerteView.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-base    文件:IatrixOverview.java   
/***********************************************************************************************
 * Die folgenden 6 Methoden implementieren das Interface ISaveablePart2 Wir benötigen das
 * Interface nur, um das Schliessen einer View zu verhindern, wenn die Perspektive fixiert ist.
 * Gibt es da keine einfachere Methode?
 */
@Override
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-base    文件:KonsListView.java   
@Override
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-base    文件:WebBrowserView.java   
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-base    文件:JournalView.java   
/***********************************************************************************************
 * Die folgenden 6 Methoden implementieren das Interface ISaveablePart2 Wir benötigen das
 * Interface nur, um das Schliessen einer View zu verhindern, wenn die Perspektive fixiert ist.
 * Gibt es da keine einfachere Methode?
 */
@Override
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-base    文件:ProblemView.java   
@Override
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:FallListeView.java   
/***********************************************************************************************
 * Die folgenden 6 Methoden implementieren das Interface ISaveablePart2 Wir benötigen das
 * Interface nur, um das Schliessen einer View zu verhindern, wenn die Perspektive fixiert ist.
 * Gibt es da keine einfachere Methode?
 */
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:FallDetailView.java   
/***********************************************************************************************
 * Die folgenden 6 Methoden implementieren das Interface ISaveablePart2 Wir benötigen das
 * Interface nur, um das Schliessen einer View zu verhindern, wenn die Perspektive fixiert ist.
 * Gibt es da keine einfachere Methode?
 */
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}
项目:elexis-3-core    文件:KonsZumVerrechnenView.java   
/***********************************************************************************************
 * Die folgenden 6 Methoden implementieren das Interface ISaveablePart2 Wir benötigen das
 * Interface nur, um das Schliessen einer View zu verhindern, wenn die Perspektive fixiert ist.
 * Gibt es da keine einfachere Methode?
 */
public int promptToSaveOnClose(){
    return GlobalActions.fixLayoutAction.isChecked() ? ISaveablePart2.CANCEL
            : ISaveablePart2.NO;
}