private void handleException(ExecutionException e) throws CoreException { Throwable cause= e.getCause(); if (cause instanceof CoreException) { throw (CoreException)cause; } else { throw new CoreException(new Status( IStatus.ERROR, RefactoringCorePlugin.getPluginId(),IStatus.ERROR, RefactoringCoreMessages.RefactoringCorePlugin_internal_error, e)); } }
private void handleException(ExecutionException e) throws CoreException { Throwable cause= e.getCause(); if (cause instanceof CoreException) { throw (CoreException)cause; } else { throw new CoreException(new Status( IStatus.ERROR, RefactoringCorePlugin.getPluginId(),IStatus.ERROR, RefactoringCoreMessages.RefactoringCorePlugin_internal_error, e)); } }
private void handleException(ExecutionException e) throws CoreException { Throwable cause= e.getCause(); if (cause instanceof CoreException) { throw (CoreException)cause; } else { throw new CoreException(new Status( IStatus.ERROR, RefactoringCorePlugin.getPluginId(),IStatus.ERROR, RefactoringCoreMessages.RefactoringCorePlugin_internal_error, e)); } }
/** * Handle the given exception. By default, the user is prompted * @param exception the exception */ protected void handle(Throwable exception) { if (exception instanceof ExecutionException) { ExecutionException ee = (ExecutionException) exception; if (ee.getCause() != null) { handle(exception.getCause()); } } IStatus status; if (exception instanceof CoreException) { CoreException ce = (CoreException) exception; status = ce.getStatus(); } else { status = new Status(IStatus.ERROR, TeamUIPlugin.ID, 0, TeamUIMessages.exception, exception); } ErrorDialog.openError(configuration.getSite().getShell(), null, null, status); }
/** * Handle the given exception. By default, the user is prompted * @param exception the exception */ protected void handle(Throwable exception) { if (exception instanceof ExecutionException) { ExecutionException ee = (ExecutionException) exception; if (ee.getCause() != null) { handle(exception.getCause()); } } IStatus status; if (exception instanceof CoreException) { CoreException ce = (CoreException) exception; status = ce.getStatus(); } else { status = new Status(IStatus.ERROR, TeamUIPlugin.ID, 0, TeamUIMessages.exception, exception); } ErrorDialog.openError(configuration.getSite().getShell(), null, null, status); }
/** * Execute the specified undoable operation */ void execute(IUndoableOperation operation, String title, IProgressMonitor monitor, IAdaptable uiInfo) { try { PlatformUI.getWorkbench().getOperationSupport() .getOperationHistory().execute(operation, monitor, uiInfo); } catch (ExecutionException e) { if (e.getCause() instanceof CoreException) { ErrorDialog.openError(view.getShell(), title, null, ((CoreException)e.getCause()).getStatus()); } else { IDEWorkbenchPlugin.log(title, e); } } }
/** * Execute the specified undoable operation */ void execute(IUndoableOperation operation, String title, IProgressMonitor monitor, IAdaptable uiInfo) { try { PlatformUI.getWorkbench().getOperationSupport() .getOperationHistory().execute(operation, monitor, uiInfo); } catch (ExecutionException e) { if (e.getCause() instanceof CoreException) { ErrorDialog .openError(WorkspaceUndoUtil.getShell(uiInfo), title, null, ((CoreException) e.getCause()) .getStatus()); } else { IDEWorkbenchPlugin.log(title, e); } } }
private void installEARFacets(IProject aProject, String specVersion, boolean existing) { IDataModel dm = DataModelFactory.createDataModel(new FacetProjectCreationDataModelProvider()); dm.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, aProject.getName()); FacetDataModelMap facetDMs = (FacetDataModelMap) dm.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP); IDataModel newModel = setupEarInstallAction(aProject,specVersion); facetDMs.add(newModel); try { /** * Warning cleanup 12/07/2005 */ //IStatus stat = dm.getDefaultOperation().execute(null,null); dm.getDefaultOperation().execute(null,null); } catch (ExecutionException e) { Throwable realException = e.getCause(); if (realException != null && realException instanceof CoreException) { IStatus st = ((CoreException)realException).getStatus(); if (st != null) System.out.println(st); realException.printStackTrace(); } } }
private void installStaticWebFacets(IProject project2, String specVersion, boolean existing) { IDataModel dm = DataModelFactory.createDataModel(new FacetProjectCreationDataModelProvider()); dm.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, project2.getName()); FacetDataModelMap facetDMs = (FacetDataModelMap) dm.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP); //facetDMs.add(setupJavaInstallAction(webProj,existing,CreationConstants.DEFAULT_WEB_SOURCE_FOLDER)); IDataModel newModel = setupStaticWebInstallAction(project2); facetDMs.add(newModel); //setRuntime(webProj,dm); //Setting runtime property try { /** * Warning cleanup 12/07/2005 */ //IStatus stat = dm.getDefaultOperation().execute(null,null); dm.getDefaultOperation().execute(null,null); } catch (ExecutionException e) { Throwable realException = e.getCause(); if (realException != null && realException instanceof CoreException) { IStatus st = ((CoreException)realException).getStatus(); if (st != null) System.out.println(st); realException.printStackTrace(); } } }
private void installUtilityFacets(IProject aProject, String specVersion, boolean existing) { replaceDeployablesOutputIfNecessary(project); IDataModel dm = DataModelFactory.createDataModel(new FacetProjectCreationDataModelProvider()); dm.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, aProject.getName()); FacetDataModelMap facetDMs = (FacetDataModelMap) dm.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP); facetDMs.add(setupJavaInstallAction(aProject,existing,"src")); IDataModel newModel = setupUtilInstallAction(aProject,specVersion); facetDMs.add(newModel); try { /** * Warning cleanup 12/07/2005 */ //IStatus stat = dm.getDefaultOperation().execute(null,null); dm.getDefaultOperation().execute(null,null); } catch (ExecutionException e) { Throwable realException = e.getCause(); if (realException != null && realException instanceof CoreException) { IStatus st = ((CoreException)realException).getStatus(); if (st != null) System.out.println(st); realException.printStackTrace(); } } }
/** * Execute the specified undoable operation * * @param operation * @param title * @param monitor * @param uiInfo */ public void execute(IUndoableOperation operation, String title, IProgressMonitor monitor, IAdaptable uiInfo) { try { PlatformUI.getWorkbench().getOperationSupport() .getOperationHistory().execute(operation, monitor, uiInfo); } catch (ExecutionException e) { if (e.getCause() instanceof CoreException) { StatusManager.getManager().handle( StatusUtil .newStatus(IStatus.ERROR, title, e.getCause()), StatusManager.SHOW); } else { StatusManager.getManager().handle( StatusUtil.newStatus(IStatus.ERROR, title, e)); } } }
Throwable realException = e.getCause(); if (realException != null && realException instanceof CoreException) { IStatus st = ((CoreException)realException).getStatus();
private void installConnectorFacets(IProject aProject, String specVersion, boolean existing) { replaceDeployablesOutputIfNecessary(project); IDataModel dm = DataModelFactory.createDataModel(new FacetProjectCreationDataModelProvider()); dm.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, aProject.getName()); FacetDataModelMap facetDMs = (FacetDataModelMap) dm.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP); facetDMs.add(setupJavaInstallAction(aProject,existing,J2EEPlugin.getDefault().getJ2EEPreferences().getString(J2EEPreferences.Keys.JCA_CONTENT_FOLDER))); IDataModel newModel = setupConnectorInstallAction(aProject,specVersion); facetDMs.add(newModel); try { /** * Warning cleanup 12/07/2005 */ //IStatus stat = dm.getDefaultOperation().execute(null,null); dm.getDefaultOperation().execute(null,null); } catch (ExecutionException e) { Throwable realException = e.getCause(); if (realException != null && realException instanceof CoreException) { IStatus st = ((CoreException)realException).getStatus(); if (st != null) System.out.println(st); realException.printStackTrace(); } } }
private void installAppClientFacets(IProject aProject, String specVersion, boolean existing) { replaceDeployablesOutputIfNecessary(project); IDataModel dm = DataModelFactory.createDataModel(new FacetProjectCreationDataModelProvider()); dm.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, aProject.getName()); FacetDataModelMap facetDMs = (FacetDataModelMap) dm.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP); facetDMs.add(setupJavaInstallAction(aProject,existing,J2EEPlugin.getDefault().getJ2EEPreferences().getString(J2EEPreferences.Keys.APP_CLIENT_CONTENT_FOLDER))); IDataModel newModel = setupAppClientInstallAction(aProject,specVersion); facetDMs.add(newModel); try { /** * Warning cleanup 12/07/2005 */ //IStatus stat = dm.getDefaultOperation().execute(null,null); dm.getDefaultOperation().execute(null,null); } catch (ExecutionException e) { Throwable realException = e.getCause(); if (realException != null && realException instanceof CoreException) { IStatus st = ((CoreException)realException).getStatus(); if (st != null) System.out.println(st); realException.printStackTrace(); } } }
private void installEJBFacets(IProject ejbProject2,String ejbVersion, boolean existing) { replaceDeployablesOutputIfNecessary(project); IDataModel dm = DataModelFactory.createDataModel(new FacetProjectCreationDataModelProvider()); dm.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, ejbProject2.getName()); FacetDataModelMap facetDMs = (FacetDataModelMap) dm.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP); facetDMs.add(setupJavaInstallAction(ejbProject2,existing,J2EEPlugin.getDefault().getJ2EEPreferences().getString(J2EEPreferences.Keys.EJB_CONTENT_FOLDER))); IDataModel newModel = setupEjbInstallAction(ejbProject2,ejbVersion,existing); facetDMs.add(newModel); //setRuntime(ejbProject2,dm); //Setting runtime property try { /** * Warning cleanup 12/07/2005 */ //IStatus stat = dm.getDefaultOperation().execute(null,null); dm.getDefaultOperation().execute(null,null); } catch (ExecutionException e) { Throwable realException = e.getCause(); if (realException != null && realException instanceof CoreException) { IStatus st = ((CoreException)realException).getStatus(); if (st != null) System.out.println(st); realException.printStackTrace(); } } } private void installWEBFacets(IProject webProj,String specVersion, boolean existing) {