Search in sources :

Example 71 with DatabaseModelBean

use of net.heartsome.cat.common.bean.DatabaseModelBean in project translationstudio8 by heartsome.

the class ProjectConfigerUtil method clearConfig.

public void clearConfig() {
    if (null == config) {
        return;
    }
    ProjectInfoBean currentProjectBean = config.getCurrentProjectConfig();
    if (null == currentProjectBean) {
        return;
    }
    currentProjectBean.setTbDb(new ArrayList<DatabaseModelBean>());
    currentProjectBean.setTmDb(new ArrayList<DatabaseModelBean>());
    config.updateProjectConfig(currentProjectBean);
    try {
        projcet.refreshLocal(IResource.DEPTH_ZERO, null);
    } catch (CoreException e) {
        logger.error("", e);
    }
}
Also used : ProjectInfoBean(net.heartsome.cat.common.bean.ProjectInfoBean) CoreException(org.eclipse.core.runtime.CoreException) DatabaseModelBean(net.heartsome.cat.common.bean.DatabaseModelBean)

Aggregations

DatabaseModelBean (net.heartsome.cat.common.bean.DatabaseModelBean)71 ArrayList (java.util.ArrayList)27 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)16 SQLException (java.sql.SQLException)15 SelectionEvent (org.eclipse.swt.events.SelectionEvent)14 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)12 MenuItem (org.eclipse.swt.widgets.MenuItem)12 List (java.util.List)11 Point (org.eclipse.swt.graphics.Point)11 File (java.io.File)10 GridData (org.eclipse.swt.layout.GridData)10 GridLayout (org.eclipse.swt.layout.GridLayout)10 Button (org.eclipse.swt.widgets.Button)10 Composite (org.eclipse.swt.widgets.Composite)10 Label (org.eclipse.swt.widgets.Label)10 Menu (org.eclipse.swt.widgets.Menu)10 Iterator (java.util.Iterator)8 Map (java.util.Map)8 MetaData (net.heartsome.cat.common.bean.MetaData)8 HSDropDownButton (net.heartsome.cat.common.ui.HSDropDownButton)8