本文整理汇总了Java中org.eclipse.pde.internal.ui.PDEUIMessages类的典型用法代码示例。如果您正苦于以下问题:Java PDEUIMessages类的具体用法?Java PDEUIMessages怎么用?Java PDEUIMessages使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PDEUIMessages类属于org.eclipse.pde.internal.ui包,在下文中一共展示了PDEUIMessages类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createAbove
import org.eclipse.pde.internal.ui.PDEUIMessages; //导入依赖的package包/类
public void createAbove(Composite container, int span) {
fUseTemplate = new Button(container, SWT.CHECK);
fUseTemplate.setText(PDEUIMessages.WizardListSelectionPage_label);
GridData gd = new GridData();
gd.horizontalSpan = span;
fUseTemplate.setLayoutData(gd);
fUseTemplate.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
wizardSelectionViewer.getControl().setEnabled(fUseTemplate.getSelection());
if (!fUseTemplate.getSelection())
setDescription(""); //$NON-NLS-1$
setDescriptionEnabled(fUseTemplate.getSelection());
getContainer().updateButtons();
}
});
}
示例2: getWizard
import org.eclipse.pde.internal.ui.PDEUIMessages; //导入依赖的package包/类
public IWizard getWizard() {
if (wizard != null)
return wizard; // we've already created it
IBaseProjectWizard pluginWizard;
try {
pluginWizard = createWizard(); // create instance of target wizard
} catch (CoreException e) {
if (parentWizardPage instanceof BaseWizardSelectionPage)
((BaseWizardSelectionPage) parentWizardPage).setDescriptionText(""); //$NON-NLS-1$
PDEPlugin.logException(e);
parentWizardPage.setErrorMessage(PDEUIMessages.Errors_CreationError_NoWizard);
MessageDialog.openError(parentWizardPage.getWizard().getContainer().getShell(), PDEUIMessages.Errors_CreationError, PDEUIMessages.Errors_CreationError_NoWizard);
return null;
}
wizard = pluginWizard;
//wizard.setUseContainerState(false);
return wizard;
}
示例3: flagMissingRequiredOption
import org.eclipse.pde.internal.ui.PDEUIMessages; //导入依赖的package包/类
/**
* Locates the page that this option is presented in and flags that the
* option is required and is currently not set. The flagging is done by
* setting the page incomplete and setting the error message that uses
* option's message label.
*
* @param option
* the option that is required and currently not set
*/
protected void flagMissingRequiredOption(TemplateOption option) {
WizardPage page = null;
for (int i = 0; i < pages.size(); i++) {
TemplatePage tpage = pages.get(i);
ArrayList<TemplateOption> list = tpage.options;
if (list.contains(option)) {
page = tpage.page;
break;
}
}
if (page != null) {
page.setPageComplete(false);
String message = NLS.bind(PDEUIMessages.OptionTemplateSection_mustBeSet, option.getMessageLabel());
page.setErrorMessage(message);
}
}
示例4: handleAdd
import org.eclipse.pde.internal.ui.PDEUIMessages; //导入依赖的package包/类
/**
* Open the new target platform wizard
*/
private void handleAdd() {
NewTargetDefinitionWizard2 wizard = new NewTargetDefinitionWizard2();
wizard.setWindowTitle(PDEUIMessages.TargetPlatformPreferencePage2_4);
WizardDialog dialog = new WizardDialog(fAddButton.getShell(), wizard);
if (dialog.open() == IDialogConstants.OK_ID) {
ITargetDefinition definition = wizard.getTargetDefinition();
if(definition != null) {
buildIdentifier(definition);
targetDefinitions.add(definition);
allDefinitions.add(definition);
fTableViewer.refresh();
fTableViewer.setSelection(new StructuredSelection(definition), true);
if(allDefinitions.size() == 1) {
int identifier = getIdentifier(definition);
newDefinitionId = identifier;
fTableViewer.setCheckedElements(new Object[] {definition});
fTableViewer.refresh(definition);
rebuild_Count = 0;
}
is_Dirty = true;
}
}
}
示例5: doEditTarget
import org.eclipse.pde.internal.ui.PDEUIMessages; //导入依赖的package包/类
/**
*
* @param definition
* @return
*/
private ITargetDefinition doEditTarget(ITargetDefinition definition) {
EditTargetDefinitionWizard wizard = new EditTargetDefinitionWizard(definition, true);
wizard.setWindowTitle(PDEUIMessages.TargetPlatformPreferencePage2_6);
WizardDialog dialog = new WizardDialog(fEditButton.getShell(), wizard);
if (dialog.open() == IDialogConstants.OK_ID) {
// wizard_ContentChanged = wizard.contentChanged();
ITargetDefinition modifiedDefinition = wizard.getTargetDefinition();
if (moved_TargetDefinitions.containsKey(definition)) {
IPath moveLocation = moved_TargetDefinitions.remove(definition);
moved_TargetDefinitions.put(modifiedDefinition, moveLocation);
}
return modifiedDefinition;
}
return null;
}
示例6: TemplateListSelectionPage
import org.eclipse.pde.internal.ui.PDEUIMessages; //导入依赖的package包/类
/**
* Constructor
* @param wizardElements a list of TemplateElementWizard objects
* @param page content wizard page
* @param message message to provide to the user
*/
public TemplateListSelectionPage(ElementList wizardElements, BaseProjectWizardFields context, String message) {
super(wizardElements, message);
fContext = context;
setTitle(PDEUIMessages.WizardListSelectionPage_title);
setDescription(PDEUIMessages.WizardListSelectionPage_desc);
}
示例7: fillContextMenu
import org.eclipse.pde.internal.ui.PDEUIMessages; //导入依赖的package包/类
private void fillContextMenu(IMenuManager manager) {
manager.add(openAction);
IPluginModelBase selectedPluginModel = getSelectedPluginModel();
if (selectedPluginModel != null) {
Action dependenciesAction = new OpenPluginDependenciesAction(selectedPluginModel);
manager.add(dependenciesAction);
dependenciesAction.setText(PDEUIMessages.PluginsView_openDependencies);
dependenciesAction.setImageDescriptor(PDEPluginImages.DESC_CALLEES);
}
manager.add(new Separator());
manager.add(copyAction);
manager.add(pasteAction);
manager.add(new Separator());
manager.add(renameAction);
Collection<?> selection = getViewerSelection();
deleteAction.setText("Delete...");
if (selection.size() > 1) {
deleteAction.setText("Delete / Remove Inclusions");
} else if (selection.size() == 1 && !canDelete(selection.iterator().next())) {
deleteAction.setText("Delete (Remove Inclusion)");
}
manager.add(deleteAction);
Collection<IProductModel> productModels = getSelectedProductModels();
if (!productModels.isEmpty() && productModels.size() == selection.size()) {
manager.add(new Separator());
manager.add(new ProductNatureAddAction(viewer.getSelection()));
}
}
示例8: init
import org.eclipse.pde.internal.ui.PDEUIMessages; //导入依赖的package包/类
public void init(BaseProjectWizardFields data) {
this.data = data;
setWindowTitle(PDEUIMessages.PluginCodeGeneratorWizard_title);
}
示例9: setDescriptionText
import org.eclipse.pde.internal.ui.PDEUIMessages; //导入依赖的package包/类
public void setDescriptionText(String text) {
if (text == null)
text = PDEUIMessages.BaseWizardSelectionPage_noDesc;
descriptionBrowser.setText(text);
}
示例10: scheduleExportJob
import org.eclipse.pde.internal.ui.PDEUIMessages; //导入依赖的package包/类
protected void scheduleExportJob() throws IOException {
Path folder = Files.createTempDirectory("eclipse-export", new FileAttribute<?>[0]);
final FeatureExportInfo info = new FeatureExportInfo();
info.toDirectory = false; // in order to install from the repository
info.useJarFormat = true;
info.exportSource = false;
info.exportSourceBundle = false;
info.allowBinaryCycles = true;
info.useWorkspaceCompiledClasses = false;
info.destinationDirectory = folder.toString();
info.zipFileName = "p2-repo.zip";
info.items = getFeatures();
info.signingInfo = null; //
info.exportMetadata = true;
info.qualifier = QualifierReplacer.getDateQualifier();
final FeatureExportOperation job = new FeatureExportOperation(info, PDEUIMessages.FeatureExportJob_name);
job.setUser(true);
job.setRule(ResourcesPlugin.getWorkspace().getRoot());
job.setProperty(IProgressConstants.ICON_PROPERTY, PDEPluginImages.DESC_PLUGIN_OBJ);
// listen to job changes, we'll upload stuff when the building has been done
job.addJobChangeListener(new JobChangeAdapter() {
public void done(IJobChangeEvent event) {
if (job.hasAntErrors()) {
// if there were errors when running the ant scripts, inform
// the user where the logs can be found.
final File logLocation = new File(info.destinationDirectory, "logs.zip"); //$NON-NLS-1$
if (logLocation.exists()) {
PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
public void run() {
AntErrorDialog dialog = new AntErrorDialog(logLocation);
dialog.open();
}
});
}
} else if (event.getResult().isOK()) {
// can publish
try (CloseableHttpClient client = HttpClientBuilder.create().build()) {
// sign in and upload items
if (signIn(client)) {
uploadForm(client);
// upload the images
if (solution.getScreenshot() != null) {
uploadFile(client, Paths.get(solution.getScreenshot()), "upload-screenshot");
}
if (solution.getImage() != null) {
uploadFile(client, Paths.get(solution.getImage()), "upload-image");
}
// upload the repository
uploadFile(client, folder.resolve("p2-repo.zip"),"upload-p2repo");
}
} catch (Exception e) {
e.printStackTrace();
addMessage(IMessage.ERROR, e.getMessage());
}
}
}
});
job.schedule();
}