Is it possible to change the default images of the import and export wizards in an Eclipse 3.x application? I do not mean the wizard image which can be configured in the wizard extension point but images in the surrounding wizard that shows up when calling for example:
IHandlerService service = (IHandlerService) PlatformUI.getWorkbench()
.getService(IHandlerService.class);
service.executeCommand(ActionFactory.IMPORT.getCommandId(), null);
There is an extension point for changing the default images for standard commands (save, save as, delete etc.): org.eclipse.ui.commandImages. However, I did not found something similar for the images in the import and export dialog (wizard and category icons)
(The application is an Eclipse 3.x RCP application running on Eclipse 4.4 using the compatibility layer.)
Thank you,
Michael
I'm not quite sure which images you mean. For the large images at the top of the wizard there is no support for this.
The Import/Export wizard (org.eclipse.ui.internal.dialogs.ImportExportWizard) gets the images from org.eclipse.ui.internal.WorkbenchImages.
The paths in WorkbenchImages are hard coded to be in the icons directory of the org.eclipse.ui plugin.
The images in the tree part of the wizard come from the individual import/export wizard extension point declaration.
As described in the accepted answer there is no official method to do this but it
is possible via the declareImage of the internal class org.eclipse.ui.internal.WorkbenchImages.
In my initialize of my WorkbenchAdvisor I replaced the shared images in the following way:
#SuppressWarnings("restriction")
public class MyWorkbenchAdvisor extends WorkbenchAdvisor {
...
#Override
public void initialize(IWorkbenchConfigurer conf) {
...
try {
// wizard icon
WorkbenchImages.declareImage(
IWorkbenchGraphicConstants.IMG_WIZBAN_IMPORT_WIZ,
<get image descriptor>, true);
// folder icon
WorkbenchImages.declareImage(
ISharedImages.IMG_OBJ_FOLDER,
<get image descriptor>, true);
}...
This can break with every Eclipse version because I access the internal API but
it solved the problem for me.
Related
I have created android studio module that is supposed to be a android ui framework. Framework has few components like custom buttons, custom layouts etc. and if I include it into app i can see them in palette under "Project"
Next steps in development is to enable user to import framework using gradle and I managed to to that using jfrog but when you import into your project you are not able to see components in palette.
I tried importing just .jar and .aar files but nothing happened. And if you write xml manually components are shown in preview window normally
here is git and jfrog
P.S.: keep in mind that project is still in development so git documentations is not full!
Thanks in advance, Leo
EDIT:
If you open new project you can import framework using gradle.
Just add:
maven {
url "https://cmykui.bintray.com/maven"
}
to your root build.gradle file and
implementation 'hr.foi.air2018.cmykui:cmykui:0.3.6'
to your app build.gradle
if you want to try out a component you can add
<hr.foi.air.cmykui.component.ButtonComponent
android:id="#+id/button"
android:layout_width="match_parent"
android:layout_height="50dp" />
to see if framework is imported.
I think this is an Android Studio problem. It doesn't show View subclasses in imported modules to the Project tab of Design panel of XML.
Reason 1.
Android Studio doesn't show View subclasses in dependencies to the Project tab of Design panel.
For example, even if implementation 'com.android.support:percent:28.0.0' exists in module(app) build.gradle, android.support.percent.PercentFrameLayout doesn't show up in the Project tab of design panel. As auto-complete prompts it in Text tab of the xml, indexer can find them. So, Android Stuidio should check them if it is a public View class or not and add to Project tab, but it doesn't.
Reason 2.
I also tried with a quite simple module which contains a View subclass. It is shown in development stage (having source codes in that module), but if once built and imported as aar, it isn't.
I've tried with this.
public class CustomView extends View
{
public CustomView(final Context context, #Nullable final AttributeSet attrs)
{
super(context, attrs);
}
}
I also checked with cmykui module in the question, but the result is same. If imported from Git with source code, it appears. If imported as aar , it doesn't.
I need to ship a specific version (1.8.1.3) of XulRunner with my SWT app. My current plan is to detect the current platform and download XulRunner to the app data path of that platform. That's no problem, but to what file in that am I supposed to set the XulRunnerPath property to?
Make sure you include it in build.properties. I would suggest you to create a fragment for the SWT like how SWT does it for each platform. You need to set System property org.eclipse.swt.browser.XULRunnerPath to the dll. Please refer to
org.eclipse.swt.browser.Mozilla
static void LoadLibraries () {---}
Fragment:
http://wiki.eclipse.org/FAQ_What_is_a_plug-in_fragment%3F
I am using Windows Builder Pro in my Eclipse Helios. In NetBeans I know how to add SwingX palette. How can I add SwingX palette in Windows Builder?
If you right click on an entry in the palette, you can open up the Palette Manager, then "Add Category", and "Add Entry" or "Import Jar".
Also, if you just add whatever component you want (ie: JXTable) using Custom, it'll automatically show up in a Custom category in your palette.
A cleaner solution is simply to add both swingx-all-1.6.4.jar and swingx-beaninfo-1.6.4.jar to your build path.
Then, in the palette manager, import the swingx-all-1.6.4.jar, selecting all items.
Was playing around with it, and I have the solution.
SwingX ships in 2 jars- swingx-all-1.6.3.jar and swingx-beaninfo-1.6.3.jar, the second one contains BeanInfo classes. These are necessary if you want to import them as java beans in any IDE. So you need to merge them into a single library.
Here's what worked for me:
Make a directory called swingx.
Change to it, and unjar swingx-all-1.6.3.jar. Make a backup of META-INF/MANIFEST.MF, say to ../backup.mf.
Unjar swingx-beaninfo-1.6.3.jar to the same location. Its manifest will overwrite the previous one, hence we needed to backup.
Make sure you're in the same directory where you extracted the jars, and create a new jar that combines both of these, using the following commandline:
jar -cvfm swingx-combined.jar ../backup.mf *
This will create a fresh jar that has both the manifest (which lists all java beans within the jar) and the required BeanInfo classes.
Import this jar into WindowBuilder and you'll be able to add the required SwingX beans from it.
I was unable to add to the pallete. But, if you add the component in the source code it apears at the preview. Then you can drag it as if you got it from the pallete.
I hope it helps. Helped me...
First of all download SwingX 1.6.4 All -sources and SwingX 1.6.4 BeanInfo -sources from https://java.net/projects/swingx/downloads?search_tag=swingx-all-1.6.4.jar+&commit=search
and then add these jars to the elipse by going to project->properties->Add External JARs.
I have problem installing SwingX in my Netbeans IDE. I want to play with JXPanel and related components but i could not get right library and get it going.
I tried to download swingx.jar but there is no valid link available in internet. I somehow managed to download swingx-1.6.jar, swingx-beaninfo-0.9.7 and swingbean.jar. I imported these jar files into the new library i created "SwingX" using tools->library and after that went to tools->palette->Swing/AWT Components and added a new palette group called SwingX and added the created library (SwingX) into it. Now i get a block in my IDE as shown in the figure.
Picture 1
Then i added the library into my project which is shown in the picture 2 and when i tried to insert JXXollapsiblePane from the pallete group into a JFrame i am gettign the following error shown in picture3.
Picture 2
Picture 3
Add swingx-1.6.jar to your project instead of swingx-beaninfo-0.9.7
I have create a skeleton Wicket project using
mvn archetype:create -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.4-rc4 -DgroupId=com.mycompany -DartifactId=myproject
All the configuration/importing new project with Maven/Intellij worked fine. I proceeded to add a basic CSS file to my start page, per the following recommended way of doing it in Wicket 1.4
public class BasePage extends WebPage {
public BasePage() {
add(CSSPackageResource.getHeaderContribution(BasePage.class, "main.css"));
}
}
The main.css file has been put along side BasePage.java and BasePage.html in /src/main/java. I launch the application with Start.java. The problem is when I make changes to the CSS file it is not being picked up when I relaunch Start.java. (Changes to the java and html files are being updated when I change them)
I made sure the browser cache was being cleared, and even valided the request/response in Firfox/Firebug. It seems like somewhere between Wicket's magic and the jetty instance Start.java creates the CSS file is being cached and not updated. Any ideas?
I moved the css files into the /webapp directory and that seemed to solve the issue of getting Start.java to register the changes. I am doing the same for js files and images. Strangely, I have read (on multiple sites) people doing this in different ways (Although the consensus for HTML and Java classes is always to have them the same place).
I find an other solution that helps me. You can configure Wicket to add a timestamp to the request for a resource to solve the caching problem. In the init method of your application class call setAddLastModifiedTimeToResourceReferenceUrl of the recource settings.
public class MyApplication extends WebApplication {
#Override
protected void init() {
getResourceSettings().setAddLastModifiedTimeToResourceReferenceUrl(true);
}
}
Original: http://old.nabble.com/Javascript-CSS-being-cached-by-the-browser-even-when-it-has-changed.-Should-setAddLastModifiedTimeToResourceReferenceUrl%28true%29-be-the-default--td14886538.html