package net.sourceforge.phpdt.sql.view;
import net.sourceforge.phpdt.sql.PHPEclipseSQLPlugin;
+import net.sourceforge.phpdt.sql.actions.CloseTableAction;
+import net.sourceforge.phpdt.sql.actions.RefreshTableAction;
+import net.sourceforge.phpdt.sql.sql.SQLResults;
+import net.sourceforge.phpdt.sql.sql.TableRow;
+import net.sourceforge.phpdt.sql.view.tableview.TableAdapter;
+import net.sourceforge.phpdt.sql.wizards.DeleteRowPage;
+import net.sourceforge.phpdt.sql.wizards.InsertRowPage;
+import net.sourceforge.phpdt.sql.wizards.PHPDeleteRowPage;
+import net.sourceforge.phpdt.sql.wizards.PHPInsertRowPage;
+import net.sourceforge.phpdt.sql.wizards.PHPSelectRowPage;
+import net.sourceforge.phpdt.sql.wizards.PHPUpdateRowPage;
+import net.sourceforge.phpdt.sql.wizards.SQLRowWizard;
+import net.sourceforge.phpdt.sql.wizards.SortFilterPage;
+import net.sourceforge.phpdt.sql.wizards.UpdateRowPage;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.part.ViewPart;
-import net.sourceforge.phpdt.sql.actions.CloseTableAction;
-import net.sourceforge.phpdt.sql.actions.RefreshTableAction;
-import net.sourceforge.phpdt.sql.sql.SQLResults;
-import net.sourceforge.phpdt.sql.sql.TableRow;
-import net.sourceforge.phpdt.sql.view.tableview.TableAdapter;
-import net.sourceforge.phpdt.sql.wizards.DeleteRowPage;
-import net.sourceforge.phpdt.sql.wizards.InsertRowPage;
-import net.sourceforge.phpdt.sql.wizards.PHPSelectRowPage;
-import net.sourceforge.phpdt.sql.wizards.SQLRowWizard;
-import net.sourceforge.phpdt.sql.wizards.SortFilterPage;
-import net.sourceforge.phpdt.sql.wizards.UpdateRowPage;
-import net.sourceforge.phpdt.sql.wizards.PHPSelectRowPage;
-
public class TableView extends ViewPart implements ISelectionListener {
- public static String TABLEVIEW_ID = "net.sourceforge.phpdt.sql.view.tableview";
+ public static String TABLEVIEW_ID =
+ "net.sourceforge.phpdt.sql.view.tableview";
private Clipboard clip;
private RefreshTableAction refreshTableAction;
private CloseTableAction closeTableAction;
public void run() {
PHPSelectRowPage page = new PHPSelectRowPage("");
SQLRowWizard wizard = new SQLRowWizard();
- wizard.init("PHP Select Generation", page, row, ta);
+ wizard.init("PHP Select Generator", page, row, ta);
WizardDialog dialog =
new WizardDialog(getSite().getShell(), wizard);
dialog.open();
};
phpSelectAction.setText(Messages.getString("tableview.phpselect")); //$NON-NLS-1$
+ Action phpUpdateAction = new Action() {
+ public void run() {
+ PHPUpdateRowPage page = new PHPUpdateRowPage("");
+ SQLRowWizard wizard = new SQLRowWizard();
+ wizard.init("PHP Update Generator", page, row, ta);
+ WizardDialog dialog =
+ new WizardDialog(getSite().getShell(), wizard);
+ dialog.open();
+ }
+ };
+ phpUpdateAction.setText(Messages.getString("tableview.phpupdate")); //$NON-NLS-1$
+
+ Action phpInsertAction = new Action() {
+ public void run() {
+ PHPInsertRowPage page = new PHPInsertRowPage("");
+ SQLRowWizard wizard = new SQLRowWizard();
+ wizard.init("PHP Insert Generator", page, row, ta);
+ WizardDialog dialog =
+ new WizardDialog(getSite().getShell(), wizard);
+ dialog.open();
+ }
+ };
+ phpInsertAction.setText(Messages.getString("tableview.phpinsert")); //$NON-NLS-1$
+
+ Action phpDeleteAction = new Action() {
+ public void run() {
+ PHPDeleteRowPage page = new PHPDeleteRowPage("");
+ SQLRowWizard wizard = new SQLRowWizard();
+ wizard.init("PHP Delete Generator", page, row, ta);
+ WizardDialog dialog =
+ new WizardDialog(getSite().getShell(), wizard);
+ dialog.open();
+ }
+ };
+ phpDeleteAction.setText(Messages.getString("tableview.phpdelete")); //$NON-NLS-1$
+
mgr.add(phpSelectAction);
-
+ mgr.add(phpUpdateAction);
+ mgr.add(phpInsertAction);
+ mgr.add(phpDeleteAction);
+
mgr.add(insertAction);
mgr.add(updateAction);
mgr.add(deleteAction);
-
-
+
}
mgr.add(defaultEncodingAction);
mgr.add(UTF8EncodingAction);