/** * Gets the description file (as workspace resource). * * @return a file which points to the description */ public IFile getDescriptionFile() { IPath path= getDescriptionLocation(); if (path.isValidPath(path.toString()) && path.segmentCount() >= 2) return JavaPlugin.getWorkspace().getRoot().getFile(path); else return null; }
/** * Gets the description file (as workspace resource). * * @return a file which points to the description */ public IFile getDescriptionFile() { IPath path= getDescriptionLocation(); if (path.isValidPath(path.toString()) && path.segmentCount() >= 2) return JavaPlugin.getWorkspace().getRoot().getFile(path); else return null; }
/** * Gets the description file (as workspace resource). * * @return a file which points to the description */ public IFile getDescriptionFile() { IPath path= getDescriptionLocation(); if (path.isValidPath(path.toString()) && path.segmentCount() >= 2) return JavaPlugin.getWorkspace().getRoot().getFile(path); else return null; }
private void xmlWriteOptions(JarPackageData jarPackage, Document document, Element xmlJarDesc) throws DOMException { Element options= document.createElement("options"); //$NON-NLS-1$ xmlJarDesc.appendChild(options); options.setAttribute("overwrite", "" + jarPackage.allowOverwrite()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("compress", "" + jarPackage.isCompressed()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("exportErrors", "" + jarPackage.areErrorsExported()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("exportWarnings", "" + jarPackage.exportWarnings()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("saveDescription", "" + jarPackage.isDescriptionSaved()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("descriptionLocation", jarPackage.getDescriptionLocation().toPortableString()); //$NON-NLS-1$ options.setAttribute("useSourceFolders", "" + jarPackage.useSourceFolderHierarchy()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("buildIfNeeded", "" + jarPackage.isBuildingIfNeeded()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("includeDirectoryEntries", "" + jarPackage.areDirectoryEntriesIncluded()); //$NON-NLS-1$//$NON-NLS-2$ options.setAttribute("storeRefactorings", "" + jarPackage.isRefactoringAware()); //$NON-NLS-1$//$NON-NLS-2$ }
/** * Hook method for restoring widget values to the values that they held * last time this wizard was used to completion. */ protected void restoreWidgetValues() { if (!((JarPackageWizard)getWizard()).isInitializingFromJarPackage()) initializeJarPackage(); fExportWarningsCheckbox.setSelection(fJarPackage.exportWarnings()); fExportErrorsCheckbox.setSelection(fJarPackage.areErrorsExported()); fBuildIfNeededCheckbox.setSelection(fJarPackage.isBuildingIfNeeded()); fUseSourceFoldersCheckbox.setSelection(fJarPackage.useSourceFolderHierarchy()); fSaveDescriptionCheckbox.setSelection(fJarPackage.isDescriptionSaved()); fDescriptionFileText.setText(fJarPackage.getDescriptionLocation().toString()); }
private void xmlWriteOptions(JarPackageData jarPackage, Document document, Element xmlJarDesc) throws DOMException { Element options= document.createElement("options"); //$NON-NLS-1$ xmlJarDesc.appendChild(options); options.setAttribute("overwrite", "" + jarPackage.allowOverwrite()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("compress", "" + jarPackage.isCompressed()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("exportErrors", "" + jarPackage.areErrorsExported()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("exportWarnings", "" + jarPackage.exportWarnings()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("saveDescription", "" + jarPackage.isDescriptionSaved()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("descriptionLocation", jarPackage.getDescriptionLocation().toPortableString()); //$NON-NLS-1$ options.setAttribute("useSourceFolders", "" + jarPackage.useSourceFolderHierarchy()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("buildIfNeeded", "" + jarPackage.isBuildingIfNeeded()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("includeDirectoryEntries", "" + jarPackage.areDirectoryEntriesIncluded()); //$NON-NLS-1$//$NON-NLS-2$ options.setAttribute("storeRefactorings", "" + jarPackage.isRefactoringAware()); //$NON-NLS-1$//$NON-NLS-2$ }
private void xmlWriteOptions(JarPackageData jarPackage, Document document, Element xmlJarDesc) throws DOMException { Element options= document.createElement("options"); //$NON-NLS-1$ xmlJarDesc.appendChild(options); options.setAttribute("overwrite", "" + jarPackage.allowOverwrite()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("compress", "" + jarPackage.isCompressed()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("exportErrors", "" + jarPackage.areErrorsExported()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("exportWarnings", "" + jarPackage.exportWarnings()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("saveDescription", "" + jarPackage.isDescriptionSaved()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("descriptionLocation", jarPackage.getDescriptionLocation().toPortableString()); //$NON-NLS-1$ options.setAttribute("useSourceFolders", "" + jarPackage.useSourceFolderHierarchy()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("buildIfNeeded", "" + jarPackage.isBuildingIfNeeded()); //$NON-NLS-2$ //$NON-NLS-1$ options.setAttribute("includeDirectoryEntries", "" + jarPackage.areDirectoryEntriesIncluded()); //$NON-NLS-1$//$NON-NLS-2$ options.setAttribute("storeRefactorings", "" + jarPackage.isRefactoringAware()); //$NON-NLS-1$//$NON-NLS-2$ }
/** * Hook method for restoring widget values to the values that they held * last time this wizard was used to completion. */ protected void restoreWidgetValues() { if (!((JarPackageWizard)getWizard()).isInitializingFromJarPackage()) initializeJarPackage(); fExportWarningsCheckbox.setSelection(fJarPackage.exportWarnings()); fExportErrorsCheckbox.setSelection(fJarPackage.areErrorsExported()); fBuildIfNeededCheckbox.setSelection(fJarPackage.isBuildingIfNeeded()); fUseSourceFoldersCheckbox.setSelection(fJarPackage.useSourceFolderHierarchy()); fSaveDescriptionCheckbox.setSelection(fJarPackage.isDescriptionSaved()); fDescriptionFileText.setText(fJarPackage.getDescriptionLocation().toString()); }
/** * Hook method for restoring widget values to the values that they held * last time this wizard was used to completion. */ protected void restoreWidgetValues() { if (!((JarPackageWizard)getWizard()).isInitializingFromJarPackage()) initializeJarPackage(); fExportWarningsCheckbox.setSelection(fJarPackage.exportWarnings()); fExportErrorsCheckbox.setSelection(fJarPackage.areErrorsExported()); fBuildIfNeededCheckbox.setSelection(fJarPackage.isBuildingIfNeeded()); fUseSourceFoldersCheckbox.setSelection(fJarPackage.useSourceFolderHierarchy()); fSaveDescriptionCheckbox.setSelection(fJarPackage.isDescriptionSaved()); fDescriptionFileText.setText(fJarPackage.getDescriptionLocation().toString()); }
/** * Hook method for restoring widget values to the values that they held * last time this wizard was used to completion. */ protected void restoreWidgetValues() { // AspectJ Change Begin if (!((AJJarPackageWizard)getWizard()).isInitializingFromJarPackage()) // AspectJ Change End initializeJarPackage(); fExportWarningsCheckbox.setSelection(fJarPackage.exportWarnings()); fExportErrorsCheckbox.setSelection(fJarPackage.areErrorsExported()); fBuildIfNeededCheckbox.setSelection(fJarPackage.isBuildingIfNeeded()); fUseSourceFoldersCheckbox.setSelection(fJarPackage.useSourceFolderHierarchy()); fSaveDescriptionCheckbox.setSelection(fJarPackage.isDescriptionSaved()); fDescriptionFileText.setText(fJarPackage.getDescriptionLocation().toString()); }
@Override public boolean isPageComplete() { if (fJarPackage.isDescriptionSaved()){ if (fJarPackage.getDescriptionLocation().toString().length() == 0) { setErrorMessage(null); return false; IPath location= fJarPackage.getDescriptionLocation(); if (!location.toString().startsWith("/")) { //$NON-NLS-1$ setErrorMessage(JarPackagerMessages.JarOptionsPage_error_descriptionMustBeAbsolute); return false; String fileExtension= fJarPackage.getDescriptionLocation().getFileExtension(); if (fileExtension == null || !fileExtension.equals(JarPackagerUtil.DESCRIPTION_EXTENSION)) { setErrorMessage(Messages.format(JarPackagerMessages.JarOptionsPage_error_invalidDescriptionExtension, JarPackagerUtil.DESCRIPTION_EXTENSION));
public boolean isPageComplete() { if (fJarPackage.isDescriptionSaved()){ if (fJarPackage.getDescriptionLocation().toString().length() == 0) { setErrorMessage(null); return false; IPath location= fJarPackage.getDescriptionLocation(); if (!location.toString().startsWith("/")) { //$NON-NLS-1$ setErrorMessage(JarPackagerMessages.JarOptionsPage_error_descriptionMustBeAbsolute); return false; String fileExtension= fJarPackage.getDescriptionLocation().getFileExtension();
/** * Open an appropriate destination browser so that the user can specify a source * to import from */ protected void handleDescriptionFileBrowseButtonPressed() { SaveAsDialog dialog= new SaveAsDialog(getContainer().getShell()); dialog.create(); dialog.getShell().setText(JarPackagerMessages.JarOptionsPage_saveAsDialog_title); dialog.setMessage(JarPackagerMessages.JarOptionsPage_saveAsDialog_message); dialog.setOriginalFile(createFileHandle(fJarPackage.getDescriptionLocation())); if (dialog.open() == Window.OK) { IPath path= dialog.getResult(); path= path.removeFileExtension().addFileExtension(AJJarPackagerUtil.DESCRIPTION_EXTENSION); fDescriptionFileText.setText(path.toString()); } }
/** * Open an appropriate destination browser so that the user can specify a source * to import from */ protected void handleDescriptionFileBrowseButtonPressed() { SaveAsDialog dialog= new SaveAsDialog(getContainer().getShell()); dialog.create(); dialog.getShell().setText(JarPackagerMessages.JarOptionsPage_saveAsDialog_title); dialog.setMessage(JarPackagerMessages.JarOptionsPage_saveAsDialog_message); dialog.setOriginalFile(createFileHandle(fJarPackage.getDescriptionLocation())); if (dialog.open() == Window.OK) { IPath path= dialog.getResult(); path= path.removeFileExtension().addFileExtension(JarPackagerUtil.DESCRIPTION_EXTENSION); fDescriptionFileText.setText(path.toString()); } }
/** * Open an appropriate destination browser so that the user can specify a source * to import from */ protected void handleDescriptionFileBrowseButtonPressed() { SaveAsDialog dialog= new SaveAsDialog(getContainer().getShell()); dialog.create(); dialog.getShell().setText(JarPackagerMessages.JarOptionsPage_saveAsDialog_title); dialog.setMessage(JarPackagerMessages.JarOptionsPage_saveAsDialog_message); dialog.setOriginalFile(createFileHandle(fJarPackage.getDescriptionLocation())); if (dialog.open() == Window.OK) { IPath path= dialog.getResult(); path= path.removeFileExtension().addFileExtension(JarPackagerUtil.DESCRIPTION_EXTENSION); fDescriptionFileText.setText(path.toString()); } }
/** * Open an appropriate destination browser so that the user can specify a source * to import from */ protected void handleDescriptionFileBrowseButtonPressed() { SaveAsDialog dialog= new SaveAsDialog(getContainer().getShell()); dialog.create(); dialog.getShell().setText(JarPackagerMessages.JarOptionsPage_saveAsDialog_title); dialog.setMessage(JarPackagerMessages.JarOptionsPage_saveAsDialog_message); dialog.setOriginalFile(createFileHandle(fJarPackage.getDescriptionLocation())); if (dialog.open() == Window.OK) { IPath path= dialog.getResult(); path= path.removeFileExtension().addFileExtension(JarPackagerUtil.DESCRIPTION_EXTENSION); fDescriptionFileText.setText(path.toString()); } }
/** * Persists resource specification control setting that are to be restored * in the next instance of this page. Subclasses wishing to persist * settings for their controls should extend the hook method * <code>internalSaveWidgetValues</code>. */ public final void saveWidgetValues() { // update directory names history IDialogSettings settings= getDialogSettings(); if (settings != null) { settings.put(STORE_EXPORT_WARNINGS, fJarPackage.exportWarnings()); settings.put(STORE_EXPORT_ERRORS, fJarPackage.areErrorsExported()); settings.put(STORE_USE_SRC_FOLDERS, fJarPackage.useSourceFolderHierarchy()); settings.put(STORE_BUILD_IF_NEEDED, fJarPackage.isBuildingIfNeeded()); settings.put(STORE_SAVE_DESCRIPTION, fJarPackage.isDescriptionSaved()); settings.put(STORE_DESCRIPTION_LOCATION, fJarPackage.getDescriptionLocation().toString()); } // Allow subclasses to save values internalSaveWidgetValues(); }
/** * Persists resource specification control setting that are to be restored * in the next instance of this page. Subclasses wishing to persist * settings for their controls should extend the hook method * <code>internalSaveWidgetValues</code>. */ public final void saveWidgetValues() { // update directory names history IDialogSettings settings= getDialogSettings(); if (settings != null) { settings.put(STORE_EXPORT_WARNINGS, fJarPackage.exportWarnings()); settings.put(STORE_EXPORT_ERRORS, fJarPackage.areErrorsExported()); settings.put(STORE_USE_SRC_FOLDERS, fJarPackage.useSourceFolderHierarchy()); settings.put(STORE_BUILD_IF_NEEDED, fJarPackage.isBuildingIfNeeded()); settings.put(STORE_SAVE_DESCRIPTION, fJarPackage.isDescriptionSaved()); settings.put(STORE_DESCRIPTION_LOCATION, fJarPackage.getDescriptionLocation().toString()); } // Allow subclasses to save values internalSaveWidgetValues(); }
/** * Persists resource specification control setting that are to be restored * in the next instance of this page. Subclasses wishing to persist * settings for their controls should extend the hook method * <code>internalSaveWidgetValues</code>. */ public final void saveWidgetValues() { // update directory names history IDialogSettings settings= getDialogSettings(); if (settings != null) { settings.put(STORE_EXPORT_WARNINGS, fJarPackage.exportWarnings()); settings.put(STORE_EXPORT_ERRORS, fJarPackage.areErrorsExported()); settings.put(STORE_USE_SRC_FOLDERS, fJarPackage.useSourceFolderHierarchy()); settings.put(STORE_BUILD_IF_NEEDED, fJarPackage.isBuildingIfNeeded()); settings.put(STORE_SAVE_DESCRIPTION, fJarPackage.isDescriptionSaved()); settings.put(STORE_DESCRIPTION_LOCATION, fJarPackage.getDescriptionLocation().toString()); } // Allow subclasses to save values internalSaveWidgetValues(); }
/** * Persists resource specification control setting that are to be restored * in the next instance of this page. Subclasses wishing to persist * settings for their controls should extend the hook method * <code>internalSaveWidgetValues</code>. */ public final void saveWidgetValues() { // update directory names history IDialogSettings settings= getDialogSettings(); if (settings != null) { settings.put(STORE_EXPORT_WARNINGS, fJarPackage.exportWarnings()); settings.put(STORE_EXPORT_ERRORS, fJarPackage.areErrorsExported()); settings.put(STORE_USE_SRC_FOLDERS, fJarPackage.useSourceFolderHierarchy()); settings.put(STORE_BUILD_IF_NEEDED, fJarPackage.isBuildingIfNeeded()); settings.put(STORE_SAVE_DESCRIPTION, fJarPackage.isDescriptionSaved()); settings.put(STORE_DESCRIPTION_LOCATION, fJarPackage.getDescriptionLocation().toString()); } // Allow subclasses to save values internalSaveWidgetValues(); }