Search in sources :

Example 6 with IScreenClassContainer

use of com.twinsoft.convertigo.beans.core.IScreenClassContainer in project convertigo by convertigo.

the class ScreenClassTreeObject method rename.

public boolean rename(String newName, Boolean bDialog) {
    ScreenClass sc = getObject();
    IScreenClassContainer<?> scc = (IScreenClassContainer<?>) sc.getConnector();
    if (!sc.getName().equalsIgnoreCase(newName) && scc.getScreenClassByName(newName) != null) {
        ConvertigoPlugin.logException(new ConvertigoException("The name \"" + newName + "\" is already used by another screen class."), "Unable to change the object name.", bDialog);
        return false;
    }
    return super.rename(newName, bDialog);
}
Also used : ConvertigoException(com.twinsoft.convertigo.engine.ConvertigoException) ScreenClass(com.twinsoft.convertigo.beans.core.ScreenClass) IScreenClassContainer(com.twinsoft.convertigo.beans.core.IScreenClassContainer)

Aggregations

IScreenClassContainer (com.twinsoft.convertigo.beans.core.IScreenClassContainer)6 ScreenClass (com.twinsoft.convertigo.beans.core.ScreenClass)6 HandlerStatement (com.twinsoft.convertigo.beans.statements.HandlerStatement)5 JavelinConnector (com.twinsoft.convertigo.beans.connectors.JavelinConnector)4 Connector (com.twinsoft.convertigo.beans.core.Connector)4 Transaction (com.twinsoft.convertigo.beans.core.Transaction)4 ScHandlerStatement (com.twinsoft.convertigo.beans.statements.ScHandlerStatement)4 List (java.util.List)4 CouchDbConnector (com.twinsoft.convertigo.beans.connectors.CouchDbConnector)3 FullSyncConnector (com.twinsoft.convertigo.beans.connectors.FullSyncConnector)3 HtmlConnector (com.twinsoft.convertigo.beans.connectors.HtmlConnector)3 ScEntryHandlerStatement (com.twinsoft.convertigo.beans.statements.ScEntryHandlerStatement)3 ScExitHandlerStatement (com.twinsoft.convertigo.beans.statements.ScExitHandlerStatement)3 AbstractCouchDbTransaction (com.twinsoft.convertigo.beans.transactions.couchdb.AbstractCouchDbTransaction)3 TreeItem (org.eclipse.swt.widgets.TreeItem)3 DatabaseObject (com.twinsoft.convertigo.beans.core.DatabaseObject)2 Statement (com.twinsoft.convertigo.beans.core.Statement)2 FunctionStatement (com.twinsoft.convertigo.beans.statements.FunctionStatement)2 EngineException (com.twinsoft.convertigo.engine.EngineException)2 PartInitException (org.eclipse.ui.PartInitException)2