| Author |
Message |
|
|
Post subject: [Closed] IconImages don't show consistently
Posted: Sep 28, 2006 - 06:51 AM
|
|
Registered Member


Joined: Sep 26, 2006
Posts: 5
|
|
Hello,
I'm using MyEclipse 5.0.1 with Matisse version 4.1.
I have a JLabel for which I'm setting an Icon. I'm attempting to load it from the classpath, however, the path that works in the designer doesn't work during runtime and vice-versa.
The image is called "about.gif" and it exists down the source path in /myproject/src/com/mycompany/project/resource/about.gif, which of course is copied during build to the bin path.
While in the IconEditor, I click the classpath radio button, but if I enter /com/mycompany/project/resource/about.gif, it fails with the message "Invalid icon value! Probably malformed URL or unknown resource." Won't let me save the setting.
However, if I include the bin in front (i.e. /bin/com/mycompany/project/resource/about.gif) it's accepted and the image shows up in the designer as expected.
Of course, during runtime it does not show up b/c of the bin prefix. I can edit the code manually to leave off the /bin prefix, in which case it works during runtime, but it then does not show up in the designer.
How do I get the image to show up during runtime and design time?
Thanks,
Enzo |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Sep 28, 2006 - 03:39 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
Enzo,
I cannot reproduce this problem. I created a small test project, you can download it from here, please download it and see if it works on your machine then see if you can spot any diferences in how we are doing this. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Oct 02, 2006 - 08:08 AM
|
|
Registered Member


Joined: Sep 26, 2006
Posts: 5
|
|
Hello Riyad,
Thanks for your response. I apologize for my late response. The thread update notification went to my Junk mail folder.
In any case, I tried your test and I get the same problem. The issue is that when I run the program it doesn't work b/c it can't find the icon file.
The problem is that it's throwing the /src/ in front of the path to the icon. I added using /bin/ but it's the same issue: It works in the designer, but during runtime it can't be found, because /src/ is not on the classpath.
Thanks... |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Oct 02, 2006 - 04:42 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
I'm going to have to come to the conclusion that there is some installation problem if you open my sample project and instead of getting the same working result I get, end up with broken icon links as it works fine on the two test machines I tried it on.
It's extremely strange that it would be broken in such a weird way though. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Oct 03, 2006 - 03:10 AM
|
|
Registered Member


Joined: Sep 26, 2006
Posts: 5
|
|
Thanks Riyad,
Well, actually, I'm not sure how it's working on YOUR machine during runtime! The path to the icon is hardcoded as "/src/com/test/icon/tn_myeclipse.jpg" in the test file that you sent me. During runtime anything there should be accessible as "/com/test/icon/tn_myeclipse.jpg". In other words, stuff in the /src/ directory should be copied to /bin/. What's in /bin/ would then be the root of the classpath. Unless I'm thinking about it wrong.
Oh well, I suppose I'll get the design right using one path, then change the path for run time. It'll be a bit of a pain, but I think worth it, given MyEclipse's other features.
I have one more question though: I'm trying to add a JPanel-based bean to the palette, and I've seen instructions for using a down arrow or pull-down on the Matisse palette, then selecting "Manage Palette" or something of the sort. Problem is, I don't see a pull-down or get any options for managing the palette. Is there something I need to do to enable this feature?
BTW, I'm using 5.01 GA.
Thanks again. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Oct 03, 2006 - 03:35 AM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
Hmm, in the palette view, on the top right corner do you see the down arrow? Try expanding the view, I wonder if it's hidden. Lastly try and run the update manager to make sure you are running the most recent M4M.
Update: I had gotten so wrapped up in another M4M test project that I didn't realize I had actually never *run* the project I sent you, I just did design mode and preview mode, You are right, once I ran it, blah, NullPointerException.
I am filing this as a bug. Thanks for being patient. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Oct 03, 2006 - 04:06 PM
|
|
Registered Member


Joined: Sep 26, 2006
Posts: 5
|
|
Well, it's good to know I'm not losing my mind :)
On the Matisse palette, I don't see the down arrow. Just the minimize/maximize controls.
Also tried right clicking all over the area (tab, frame, Beans folder) to see if I could get a context-sensitive menu. Unfortunately, no dice.
The Update manager says there's no updates available (I just downloaded and installed the Matisse feature a couple of days ago).
This one's a little tougher to work around. Is there anyway to manually add components to the palette? Maybe by modifying whichever file the palette is loaded from?
Thanks
Enzo |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Oct 04, 2006 - 10:28 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
Enzo,
Try a brand new workspace just as a sanity check: File > Switch Workspace > C:\tempworkspace, hit OK, then create a new Java project and a Matisse form, in the palette do you have a drop down arrow? |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Oct 06, 2006 - 01:54 PM
|
|
Registered Member


Joined: Sep 26, 2006
Posts: 5
|
|
Riyad,
Unfortunately that didn't work. So, I tried doing a clean install of a base Eclipse (my previous version included some plugins from IBM - Callisto, I think). Then, installed MyEclipse on top of that.
That did it. I have the prized down arrow now!
Thanks a lot for your help. I appreciate your thoughtful responses on both issues.
Enzo |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Oct 06, 2006 - 02:48 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
Oh very cool, I'm glad it's wokring now. Thanks for doing that reinstall to double check, I was running out of ideas. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: IconImages don't show consistently
Posted: Oct 10, 2006 - 09:05 PM
|
|
Registered Member


Joined: May 26, 2005
Posts: 6
|
|
|
|
|
 |
|
|
Post subject:
Posted: Oct 10, 2006 - 09:09 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
Yes this patch will be going into the 5.0.3 release in early November (first week or so of November). |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Oct 31, 2006 - 11:00 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
I just confirmed that this fix is in 5.0.3, not too much longer to wait. Thanks for being patient. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Nov 21, 2006 - 08:16 AM
|
|

Joined: May 08, 2006
Posts: 4
|
|
We have encountered similar problems here with Icon images, which worked well in designer view, but did cause null exceptions on running the program. I think it had to do with our project being organized in SourceFolders.
Now with the new version 5.1 the behaviour has changed in the following way:
I create a JLabel. I select the [...] button next to the "Icon" Property.
I select the "ClassPath" radio button. I click "Select File". I am prompted with a selection dialog.
I select an icon in a folder called /gfx in my sourceFolder.
The path "/gfx/Delete.gif" appears in the "Name" text field.
I click okay, and get the following prompt: "Invalid Icon Value. Probably malformed URL or unknown resource."
Since these Problems did not appear before we started organizing our stuff in source folders, I think it has something to
do with that, but just stopping to use source folders does not really seem a valid option here.
Anyone else had that problem?
Regards,
*** Date:
Tuesday, November 21, 2006 9:16:47 AM CET
** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.4.2_10
*** MyEclipse details:
MyEclipse Enterprise Workbench
Version: 5.1.0 GA
Build id: 20061111-5.1.0-GA
*** Eclipse details:
MyEclipse Enterprise Workbench
Version: 5.1.0 GA
Build id: 20061111-5.1.0-GA
Eclipse Graphical Editing Framework
Version: 3.2.1.v20060921
Build id: 20060921-1617
Eclipse Platform
Version: 3.2.1.r321_v20060921-b_XVA-INSQSyMtx
Build id: M20060921-0945
Eclipse RCP
Version: 3.2.1.r321_v20060801-2ekW2BxmcpPUOoq
Build id: M20060921-0945
Eclipse Java Development Tools
Version: 3.2.1.r321_v20060905-R4CM1Znkvre9wC-
Build id: M20060921-0945
Eclipse Plug-in Development Environment
Version: 3.2.1.r321_v20060823-6vYLLdQ3Nk8DrFG
Build id: M20060921-0945
Eclipse Project SDK
Version: 3.2.1.r321_v20060801-tQ1w49KnTArT0FZ
Build id: M20060921-0945
Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
C:\Programme\Eclipse.2.1\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
d0c_78
-product
com.genuitec.myeclipse.product.ide
-vm
c:\winnt\system32\javaw.exe |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Nov 21, 2006 - 03:31 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
Christian,
It's possible this is a test case we didn't cover internally. Can you create a small test project with exactly this setup, and email it to me at support@myeclipseide.com ATTN Riyad, with a link to this thread so I know why I'm getting it? Also tell me in the email exactly how to reproduce the problem. I'll analyze what is going on and file a bug for the M4M team to correct. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|