Tag: eclipse rcp

添加MessageDialog消息的链接

我在做Eclipse插件开发。 我正在使用MessageDialog类。 API可以在这里找到。 我想在MessageDialog的消息中添加一个像我在“here”中所做的链接。 这是我在做的事情: String errorMessage = “You have received an error. Please visit ” + URL_NEEDED_HERE MessageDialog.openError(getShell(), “Get Existing Data Sources Error”, errorMessage); URL一直显示为String。 它可以显示为链接吗?

水平滚动条在CTabItem内的复合下不起作用

我有CtabItem,里面有一个Composite小部件。 然后,我在其中添加了一些组件。 代码是这样的 – Composite composite = new Composite(tabFolder, SWT.H_SCROLL); tabItem.setControl(composite); Label lblName = new Label(composite, SWT.NONE); lblName.setBounds(10, 28, 55, 15); lblName.setText(“Name”); textName = new StyledText(composite, SWT.BORDER); String myText = tree.getSelection()[0].getText(); textName.setText(myText); Point textNamesize = textName.computeSize(SWT.DEFAULT, SWT.DEFAULT); textName.setBounds(76, 28, textNamesize.x, 21); Label lblPath = new Label(composite, SWT.NONE); lblPath.setBounds(10, 83, 55, 15); lblPath.setText(“Path”); textPath = new […]

导出为产品后,图像不会出现在RCP应用程序中

我有一个RCP应用程序,其中我添加了一些图像作为图标。 以下方法是在按钮上添加图标的方法: public static void setIconForButton(Button button, Display d, Bundle bundle, String path) { InputStream is = null; try { is = FileLocator.openStream(bundle, new Path(path), false); Image image = new Image(d, is); button.setImage(image); } catch (IOException e1) { e1.printStackTrace(); } finally { try { if (is != null) { is.close(); } } catch (Exception e1) […]

为什么将org.slf4j.api添加到依赖项会导致在注册表错误中找不到应用程序?

如果RCP行为中有任何逻辑,我绝对不明白。 我正在尝试记录内部视图。 我的应用程序运行正常,直到我添加了对org.slf4j.api依赖 代码中没有其他任何内容被更改。 但这种依赖性变化导致了这种荒谬的错误 !ENTRY org.eclipse.osgi 4 0 2014-01-10 17:25:08.072 !MESSAGE Application error !STACK 1 java.lang.RuntimeException: Application “Try_EclipseRCPView_03.application” could not be found in the registry. The applications available are: org.eclipse.e4.ui.workbench.swt.E4Application, org.eclipse.e4.ui.workbench.swt.GenTopic, org.eclipse.equinox.app.error, org.eclipse.ant.core.antRunner. at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248) at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLaunche … 如果我删除依赖项,错误消失。 为什么????? UPDATE 最后Eclipse崩溃并删除了我的所有文件(消灭了,这不是一个笑话)。 我认为它甚至不可能。 小心Eclipse平台是由白痴写的。 我很伤心。

如何在任何系统上检查用户的访问级别

在我们的RCP应用程序中,我们在菜单贡献下新添加了一个菜单作为命令。 现在我们要根据登录系统的用户启用或禁用此新菜单。 基本上我们只想为管理员登录启用菜单,而不是为任何其他用户启用菜单。 如何实现这一目标? 提前致谢 !!

使用p2更新Eclipse E4应用程序

我正在Eclipse E4应用程序中添加更新function。 为此,我使用了Lars Vogel的源代码和教程 。 当我测试我的应用程序时,provisioningJob始终为null。 它在运行Eclipse时应该只为null。 但是当我尝试更新导出的应用程序时,provisioningJob仍然为null。 我做错了什么? public class UpdateHandler { private static final String REPOSITORY_LOC = System.getProperty(“UpdateHandler.Repo”, “file:////updateServer/repository”); @Execute public void execute(final IProvisioningAgent agent, final Shell shell, final UISynchronize sync, final IWorkbench workbench) { Job updateJob = new Job(“Update Job”) { @Override protected IStatus run(final IProgressMonitor monitor) { return checkForUpdates(agent, shell, sync, […]

Eclipse启动器ini -configuration变量可以采用相对路径吗?

我有一个RCP Eclipse产品,它将-configuration文件夹定义在与exe和ini文件不同的位置。 当我在ini指定相对于 exe配置路径时,启动产品仅在从exe目录启动时才有效。 即:/ /home/Sheldon>product.exe 除非配置路径设置为ini文件中的绝对路径 ,否则从另一个目录启动会失败 。 即: >/home/Sheldon/product.exe 对于startup或launcher.library变量,情况并非如此。 有没有办法用相对配置路径支持此设置?

带有外部第三方jar的Eclipse插件

我有一个RCP应用程序,其中包括不同的插件。 在其中一个插件中,我正在使用外部第三方jar。 由于版权原因,我无法将该jar包装到我的产品中。 所以我尝试在运行时将jar包含为外部jar。 我所做的如下 在Plugin manifest.mf我有 Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: EaCom-plugin;singleton:=true Bundle-Version: 2.1.0 Require-Bundle: org.eclipse.core.runtime Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-ClassPath: ., external:$eaapi_location$/eaapi.jar Bundle-NativeCode: external:$eaapi_location$/SSJavaCOM.dll Export-Package: org.sparx Bundle-Vendor: %pluginVendor 在运行时 – >导出的包下我添加了 org.sparx 在我的类路径下 external:$eaapi_location$/eaapi.jar build.properties source.. = src/main/java/,\ src/main/scala/,\ src/main/resources/,\ src/test/java/,\ src/test/scala/,\ src/test/resources/ output.. = bin/ bin.includes = META-INF/,\ 在build.properties中,我在第一行有一个警告。 警告是 source.external:缺少$ eaapi_location […]

使用Eclipse RCP程序打印

我正在寻找一种好的,标准的方法来在我的RCP程序中生成“输出”并打印它。 这应该适用于Windows,Mac OS和Linux上的标准打印对话框。 我知道Birt项目,但我找不到任何关于如何在RCP程序中实现它以及如何调用标准打印对话框以及如何将Birt生成的报告传递给打印机的提示。 所有提示都很开心。

使用’PlatformUI.getWorkbench()。restart()’重启Eclipse不会重启RCP产品

在调用PlatformUI.getWorkbench().restart() ,应用程序只是关闭并拒绝重新启动产品。