Eclipse 插件:JavaFX 平台中的 getBundle 资源
Eclipse plugin : getBundle resource within JavaFX Platform
我 运行 遇到了一些问题。我正在 eclipse 中开发一个插件,我正在使用 JavaFX 创建用于面部检测的 GUI。问题是我需要从我的包中获取类型为 "org.eclipse.core.runtime.Platform;" 的资源,而我已经导入了 "import javafx.application.Platform;" 以便像这样更新 Ui:
Platform.runLater(new Runnable() {
@Override
public void run()
{
frameView.setImage(tmp);
}
});
}
}
};
如您所见,如果我尝试导入 "org.eclipse.core.runtime.Platform;" 以使用 "Bundle bundle = Platform.getBundle("Recognise");"
,则导入之间存在冲突
在导入 JavaFX 平台时有什么方法可以访问这个包吗?
您只需为其中之一使用 fully-qualified class 名称(具体来说,对于您不导入的那个):
import javafx.application.Platform ;
// ...
Platform.runLater(() -> { /* ... */});
// ...
Bundle bundle = org.eclipse.core.runtime.Platform.getBundle("Recognise");
我 运行 遇到了一些问题。我正在 eclipse 中开发一个插件,我正在使用 JavaFX 创建用于面部检测的 GUI。问题是我需要从我的包中获取类型为 "org.eclipse.core.runtime.Platform;" 的资源,而我已经导入了 "import javafx.application.Platform;" 以便像这样更新 Ui:
Platform.runLater(new Runnable() {
@Override
public void run()
{
frameView.setImage(tmp);
}
});
}
}
};
如您所见,如果我尝试导入 "org.eclipse.core.runtime.Platform;" 以使用 "Bundle bundle = Platform.getBundle("Recognise");"
,则导入之间存在冲突在导入 JavaFX 平台时有什么方法可以访问这个包吗?
您只需为其中之一使用 fully-qualified class 名称(具体来说,对于您不导入的那个):
import javafx.application.Platform ;
// ...
Platform.runLater(() -> { /* ... */});
// ...
Bundle bundle = org.eclipse.core.runtime.Platform.getBundle("Recognise");