本文整理汇总了Java中org.eclipse.swt.SWT.CURSOR_WAIT属性的典型用法代码示例。如果您正苦于以下问题:Java SWT.CURSOR_WAIT属性的具体用法?Java SWT.CURSOR_WAIT怎么用?Java SWT.CURSOR_WAIT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.swt.SWT
的用法示例。
在下文中一共展示了SWT.CURSOR_WAIT属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
@Override
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
MessageDialog.openInformation(
shell,
"Convertigo Plug-in",
"The choosen operation is not yet implemented : '"+ action.getId() + "'.");
shell.setCursor(null);
waitCursor.dispose();
}
示例2: run
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null)
explorerView.renameSelectedTreeObject();
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to rename the "+ type +"!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例3: run
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
DatabaseObjectTreeObject treeObject = null;
RouteActionComponent component = null;
TreeObject[] treeObjects = explorerView.getSelectedTreeObjects();
for (int i = treeObjects.length-1 ; i>=0 ; i--) {
treeObject = (DatabaseObjectTreeObject) treeObjects[i];
if (treeObject instanceof MobileRouteActionComponentTreeObject) {
MobileRouteActionComponentTreeObject componentTreeObject = (MobileRouteActionComponentTreeObject)treeObject;
component = (RouteActionComponent)componentTreeObject.getObject();
component.setEnabled(false);
componentTreeObject.setEnabled(false);
componentTreeObject.hasBeenModified(true);
TreeObjectEvent treeObjectEvent = new TreeObjectEvent(componentTreeObject, "isEnabled", true, false);
explorerView.fireTreeObjectPropertyChanged(treeObjectEvent);
}
}
explorerView.refreshSelectedTreeObjects();
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to disable action!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例4: run
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
TreeObject parentTreeObject = null;
DatabaseObject databaseObject = null;
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
parentTreeObject = explorerView.getFirstSelectedTreeObject();
if (parentTreeObject instanceof ObjectsFolderTreeObject) {
parentTreeObject = ((ObjectsFolderTreeObject) parentTreeObject).getParent();
databaseObject = (DatabaseObject) parentTreeObject.getObject();
}
else {
databaseObject = (DatabaseObject) parentTreeObject.getObject();
}
ComponentObjectWizard newObjectWizard = new ComponentObjectWizard(databaseObject, databaseObjectClassName);
WizardDialog wzdlg = new WizardDialog(shell, newObjectWizard);
wzdlg.setPageSize(850, 650);
wzdlg.open();
int result = wzdlg.getReturnCode();
if ((result != Window.CANCEL) && (newObjectWizard.newBean != null)) {
postCreate(parentTreeObject, newObjectWizard.newBean);
}
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to create a new database object '"+ databaseObjectClassName +"'!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例5: run
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
ProjectTreeObject projectTreeObject = (ProjectTreeObject)explorerView.getFirstSelectedTreeObject();
if (projectTreeObject != null) {
CustomAdditionsWizard caz = new CustomAdditionsWizard(projectTreeObject.getName());
WizardDialog wzdlg = new WizardDialog(shell, caz);
wzdlg.setPageSize(450, 250);
wzdlg.open();
}
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to add customized file!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例6: run
@Override
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
TreeObject treeObject = explorerView.getFirstSelectedTreeObject();
Object databaseObject = treeObject.getObject();
//For each database object from the current project we find the undefined global symbols
if ((databaseObject != null) && (databaseObject instanceof Project)) {
Project project = (Project)treeObject.getObject();
Engine.theApp.databaseObjectsManager.symbolsCreateUndefined(project.getName());
//Reload the project
explorerView.reloadProject(treeObject);
ConvertigoPlugin.infoMessageBox("The global symbols file has been successfully updated!");
}
}
}
catch (Exception e) {
ConvertigoPlugin.logException(e, "Unable to declare global symbols from the selected project!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:35,代码来源:DeclareGlobalSymbolsFromThisProjectAction.java
示例7: run
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
TreeObject treeObject = explorerView.getFirstSelectedTreeObject();
Object databaseObject = treeObject.getObject();
if ((databaseObject != null) && (databaseObject instanceof TransactionStep)) {
TransactionStep transactionStep = (TransactionStep)databaseObject;
transactionStep.importVariableDefinition();
if (transactionStep.hasChanged) {
explorerView.reloadTreeObject(treeObject);
StructuredSelection structuredSelection = new StructuredSelection(treeObject);
ConvertigoPlugin.getDefault().getPropertiesView().selectionChanged((IWorkbenchPart)explorerView, structuredSelection);
}
}
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to add transaction variables to step!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例8: run
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
TreeObject treeObject = explorerView.getFirstSelectedTreeObject();
if ((treeObject != null) && (treeObject instanceof TransactionTreeObject)) {
TransactionTreeObject transactionTreeObject = (TransactionTreeObject)treeObject;
Transaction transaction = transactionTreeObject.getObject();
transactionTreeObject.getConnectorTreeObject().openConnectorEditor();
Connector connector = (Connector)transaction.getParent();
ProjectTreeObject projectTreeObject = transactionTreeObject.getProjectTreeObject();
ConnectorEditor connectorEditor = projectTreeObject.getConnectorEditor(connector);
if (connectorEditor != null) {
getActivePage().activate(connectorEditor);
connectorEditor.getDocument(transaction.getName(), true);
}
}
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to execute the selected transaction!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例9: run
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
TreeObject treeObject = explorerView.getFirstSelectedTreeObject();
Object databaseObject = treeObject.getObject();
if ((databaseObject != null) && (databaseObject instanceof TestCase)) {
TestCase testCase = (TestCase)databaseObject;
testCase.importRequestableVariables((RequestableObject)testCase.getParent());
if (testCase.hasChanged) {
explorerView.reloadTreeObject(treeObject);
StructuredSelection structuredSelection = new StructuredSelection(treeObject);
ConvertigoPlugin.getDefault().getPropertiesView().selectionChanged((IWorkbenchPart)explorerView, structuredSelection);
}
}
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to add requestable variables to test case!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例10: run
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
TraceTreeObject traceObject = (TraceTreeObject)explorerView.getFirstSelectedTreeObject();
MessageBox messageBox = new MessageBox(shell,SWT.YES | SWT.NO | SWT.CANCEL | SWT.ICON_QUESTION | SWT.APPLICATION_MODAL);
String message = java.text.MessageFormat.format("Do you really want to delete the trace \"{0}\"?", new Object[] {traceObject.getName()});
messageBox.setMessage(message);
if (messageBox.open() == SWT.YES) {
File file = (File) traceObject.getObject();
if (file.exists()) {
if (file.delete()) {
TreeParent treeParent = traceObject.getParent();
treeParent.removeChild(traceObject);
explorerView.refreshTreeObject(treeParent);
}
else {
throw new Exception("Unable to delete file \""+ file.getAbsolutePath() + "\"");
}
}
}
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to delete the trace file!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例11: run
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
ProjectTreeObject projectTreeObject = (ProjectTreeObject)explorerView.getFirstSelectedTreeObject();
if (projectTreeObject != null) {
StatisticsDialog stats = new StatisticsDialog(shell,
projectTreeObject.getName(), projectTreeObject.getObject().getComment(),
projectTreeObject.getObject().getVersion());
stats.open();
}
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to compute statistics!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例12: run
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
TreeObject treeObject = explorerView.getFirstSelectedTreeObject();
if (treeObject instanceof MobileComponentTreeObject) {
if (treeObject instanceof MobileApplicationComponentTreeObject) {
MobileApplicationComponentTreeObject mpcto = (MobileApplicationComponentTreeObject) treeObject;
ApplicationComponentEditor editor = mpcto.activeEditor(false);
editor.launchBuilder(forceInstall, forceClean);
}
}
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to open the mobile builder!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例13: run
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
DatabaseObjectTreeObject treeObject = null;
Step step = null;
TreeObject[] treeObjects = explorerView.getSelectedTreeObjects();
for (int i = treeObjects.length-1 ; i>=0 ; i--) {
treeObject = (DatabaseObjectTreeObject) treeObjects[i];
if (treeObject instanceof StepTreeObject) {
StepTreeObject stepTreeObject = (StepTreeObject)treeObject;
step = (Step)stepTreeObject.getObject();
step.setEnabled(true);
stepTreeObject.setEnabled(true);
stepTreeObject.hasBeenModified(true);
TreeObjectEvent treeObjectEvent = new TreeObjectEvent(stepTreeObject, "isEnable", false, true);
explorerView.fireTreeObjectPropertyChanged(treeObjectEvent);
}
}
explorerView.refreshSelectedTreeObjects();
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to enable step!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例14: run
@Override
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
TreeObject treeObject = explorerView.getFirstSelectedTreeObject();
Object databaseObject = treeObject.getObject();
if ((databaseObject != null) && (databaseObject instanceof UrlMappingParameter)) {
UrlMappingParameter parameter = (UrlMappingParameter)databaseObject;
TreeParent treeParent = treeObject.getParent();
DatabaseObjectTreeObject parentTreeObject = null;
if (treeParent instanceof DatabaseObjectTreeObject)
parentTreeObject = (DatabaseObjectTreeObject)treeParent;
else
parentTreeObject = (DatabaseObjectTreeObject)treeParent.getParent();
if (parentTreeObject != null) {
// Create new Body parameter
BodyParameter bodyParameter = new BodyParameter();
if (DatabaseObjectsManager.acceptDatabaseObjects(parameter.getParent(), bodyParameter) ) {
bodyParameter.setComment(parameter.getComment());
bodyParameter.setArray(false);
bodyParameter.setMultiValued(false);
bodyParameter.setRequired(parameter.isRequired());
bodyParameter.setMappedVariableName(parameter.getMappedVariableName());
bodyParameter.bNew = true;
bodyParameter.hasChanged = true;
// Add new parameter to parent operation
UrlMappingOperation operation = (UrlMappingOperation) parameter.getParent();
operation.changeTo(bodyParameter);
// Add new parameter in Tree
UrlMappingParameterTreeObject parameterTreeObject = new UrlMappingParameterTreeObject(explorerView.viewer,bodyParameter);
treeParent.addChild(parameterTreeObject);
// Delete old parameter
parameter.delete();
// Rename new parameter
bodyParameter.setName(parameter.getName());
// Reload in tree
parentTreeObject.hasBeenModified(true);
explorerView.reloadTreeObject(parentTreeObject);
explorerView.setSelectedTreeObject(explorerView.findTreeObjectByUserObject(bodyParameter));
} else {
throw new EngineException("You cannot paste to a " + parameter.getParent().getClass().getSimpleName() + " a database object of type " + bodyParameter.getClass().getSimpleName());
}
}
}
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to change to Body parameter!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例15: run
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
ConnectorTreeObject connectorTreeObject = (ConnectorTreeObject)explorerView.getFirstSelectedTreeObject();
Connector connector = (Connector)connectorTreeObject.getObject();
Project project = connector.getProject();
// Report from 4.5: fix #401
ConnectorTreeObject defaultConnectorTreeObject = null;
Connector defaultConnector = project.getDefaultConnector();
if (defaultConnector != null) {
defaultConnectorTreeObject = (ConnectorTreeObject)explorerView.findTreeObjectByUserObject(defaultConnector);
}
project.setDefaultConnector(connector);
if (defaultConnectorTreeObject != null) {
defaultConnectorTreeObject.isDefault = false;
defaultConnectorTreeObject.hasBeenModified(true);
}
connectorTreeObject.isDefault = true;
connectorTreeObject.hasBeenModified(true);
// Updating the tree
explorerView.refreshTreeObject(connectorTreeObject.getParentDatabaseObjectTreeObject());
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to set connector to default one!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}