archi-contribs / specialization-plugin

Plugin for Archi to specialize concepts (figure, icon...)
Other
29 stars 2 forks source link

Icons and replacement labels are not rendering #20

Closed brianjwilson closed 5 years ago

brianjwilson commented 5 years ago

I'm using Archi 4.3 and specialization-plugin 1.09 on a fresh model on a Mac. I have turned on all of the Replace All options at the plugin preferences pane (although I've tried setting them at model and view level as well). The icon setting UI shows the image that I choose, so it is able to access the image files. However, after changing values in the components the rendered view does not change (only changing the name field itself produces a visible change).

I've run with the trace log on and it doesn't appear that it is even trying to redraw the components.

Here is the log output when I first enable it:

2018-10-16 15:16:10 DEBUG  525:PreferencePage                           - Logger initialised.
2018-10-16 15:16:10 TRACE  525:PreferencePage                           ┌ log4j.rootLogger = TRACE, stdout, filelog4j.appender.stdout = org.apache.log4j.ConsoleAppender
2018-10-16 15:16:10 TRACE  525:PreferencePage                           │ log4j.appender.stdout.Target = System.out
2018-10-16 15:16:10 TRACE  525:PreferencePage                           │ log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
2018-10-16 15:16:10 TRACE  525:PreferencePage                           │ log4j.appender.stdout.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %-5p %4L:%-40.40C{1} %m%n
2018-10-16 15:16:10 TRACE  525:PreferencePage                           │ log4j.appender.file = org.apache.log4j.FileAppender
2018-10-16 15:16:10 TRACE  525:PreferencePage                           │ log4j.appender.file.ImmediateFlush = true
2018-10-16 15:16:10 TRACE  525:PreferencePage                           │ log4j.appender.file.Append = false
2018-10-16 15:16:10 TRACE  525:PreferencePage                           │ log4j.appender.file.Encoding = UTF-8
2018-10-16 15:16:10 TRACE  525:PreferencePage                           │ log4j.appender.file.File = /Users/wilsb047/SpecializationPlugin.log
2018-10-16 15:16:10 TRACE  525:PreferencePage                           └ log4j.appender.file.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %-5p %4L:%-40.40C{1} %m%n

Here is the output when I select an application component, edit the replace label value and then change the icon file reference:

2018-10-16 15:18:25 TRACE  112:SpecializationIconSection$Filter         - Showing icon tab.
2018-10-16 15:18:25 TRACE   59:SpecializationElementLabelSection$Filter - Showing label tab.
2018-10-16 15:18:25 TRACE   66:SpecializationDrillDownSection$Filter    - Showing Drill down tab.
2018-10-16 15:18:25 TRACE  112:SpecializationIconSection$Filter         - Showing icon tab.
2018-10-16 15:18:25 TRACE   59:SpecializationElementLabelSection$Filter - Showing label tab.
2018-10-16 15:18:25 TRACE   66:SpecializationDrillDownSection$Filter    - Showing Drill down tab.
2018-10-16 15:18:25 TRACE  112:SpecializationIconSection$Filter         - Showing icon tab.
2018-10-16 15:18:25 TRACE   59:SpecializationElementLabelSection$Filter - Showing label tab.
2018-10-16 15:18:25 TRACE   66:SpecializationDrillDownSection$Filter    - Showing Drill down tab.
2018-10-16 15:18:25 TRACE  756:SpecializationIconSection                - Refreshing controls
2018-10-16 15:18:25 TRACE  112:SpecializationIconSection$Filter         - Showing icon tab.
2018-10-16 15:18:25 TRACE  756:SpecializationIconSection                - Refreshing controls
2018-10-16 15:18:30 TRACE   59:SpecializationElementLabelSection$Filter - Showing label tab.
2018-10-16 15:18:30 TRACE  260:SpecializationElementLabelSection        - Setting element to ArchimateElementEditPart( com.archimatetool.model.impl.DiagramModelArchimateObject@553da911 (id: 27d45ab5-dee7-4a1b-8f1f-93c10f018f82, name: ) (font: null, fontColor: null, lineWidth: 1, lineColor: null, textAlignment: 2, fillColor: null, alpha: 255) (textPosition: 0, type: 0) )
2018-10-16 15:18:30 TRACE  277:SpecializationElementLabelSection        - Refreshing controls
2018-10-16 15:18:35 TRACE  277:SpecializationElementLabelSection        - Refreshing controls
2018-10-16 15:18:35 TRACE  277:SpecializationElementLabelSection        - Refreshing controls
2018-10-16 15:18:36 TRACE  277:SpecializationElementLabelSection        - Refreshing controls
2018-10-16 15:18:36 TRACE  277:SpecializationElementLabelSection        - Refreshing controls
2018-10-16 15:18:36 TRACE  277:SpecializationElementLabelSection        - Refreshing controls
2018-10-16 15:19:03 TRACE  522:SpecializationIconSection$2              - Getting folder content : "/Users/wilsb047/Pictures"
... found some subfolders...
2018-10-16 15:19:03 TRACE  549:SpecializationIconSection$2              - found image : 02205-TR-44.jpg
... found some other images...
2018-10-16 15:19:03 TRACE  549:SpecializationIconSection$2              - found image : YU5-10.jpg
2018-10-16 15:19:11 TRACE  444:SpecializationIconSection                - Showing preview for image "/Users/wilsb047/Pictures/Cube.png"
2018-10-16 15:19:14 TRACE  444:SpecializationIconSection                - Showing preview for image "/Users/wilsb047/Pictures/Cube.png"
2018-10-16 15:19:14 TRACE  444:SpecializationIconSection                - Showing preview for image "/Users/wilsb047/Pictures/Cube.png"
2018-10-16 15:19:19 TRACE  277:SpecializationElementLabelSection        - Refreshing controls

So it refreshes the controls in the inspector a lot but never seems to do anything to the view.

herve91 commented 5 years ago

Hi Brian,

I'm very puzzled. The last person who had this kind of behavior solved it by renaming the JAR file, replacing the version which was 4 digits (x.y.z.t) to a 3 digit number (x.y.z).

I still do not understand as it was just in the file name (the internal version number was not changed) but we came to the conclusion that the version should always stay with 3 digits.

In your case, the version number is in 3 digits form so I haven't have a clue about what can happen.

What I can suggest is for you to try older version, just to know if you experience the same behavior with all of them, or only the last one.

Then I can try to find other ways to compile the JAR file, or try to change the Java version used to generate the JAR file, even if it should not have any impact ... but who knows ...

My apologies, I cannot provide a best answer, as I do not own a MAC to test and Apple do not allow to create a VM running MAC OS.

Best regards Hervé

brianjwilson commented 5 years ago

Thanks, Hervé. Yeah, I noticed some others had similar problems but I missed that a file rename had been a fix, but it sounds like you already covered for that condition. I had considered trying a previous version, I will give it a go. It's a fantastic plugin.

herve91 commented 5 years ago

I'm trying to find a colleague that have got a MAC to conduct dome testing but until then, I won't be able to be really helpful I'm afraid.

Please let me know if you find anything that can give me a clue ...

brianjwilson commented 5 years ago

It may be something local to my machine but I have no idea what. Rolling back to an oder version of the plugin didn't make any difference, and rolling the app back to 4.2 didn't seem to help, either. I suppose I will just have to live without this plugin for the time being.

herve91 commented 5 years ago

Hey Brian,

I managed to get a MAC :-) image

But I never used one so I'm a bit lost ... could you please help me ?

How do you expand the Archi file to put the JAR file in the plugins folder ?

Once I know how to test my plugins on MAC, I'll be able to investigate ...

Thanks Hervé

brianjwilson commented 5 years ago

Usually I do it from the command line, but the other option is to right click over the executable and choose "Show Package Contents".

herve91 commented 5 years ago

Thanks.

I reproduced your issue. When I try to change a label, it is not changed. This means that it does not come from your MAC but there is something that MAC does not like in my plugin.

I cannot guarantee that I will find why it doesn't work, but at least I can now do some testing.

I'll let you know ASAP.

Best regards Hervé

herve91 commented 5 years ago

Hi,

I still do not understand why the JAR file does not work, but I installed Eclipse on my MAC and generated a JAR file that works.

It will do the trick until I understand what happens.

Please tell me if it works for you.

Best regards Hervé

brianjwilson commented 5 years ago

The updated plugin is indeed working, thanks! So you think that there might be a build inconsistency between Eclipse on Windows and Eclipse on MacOS? All you did was rebuild on MacOS?

herve91 commented 5 years ago

Yes, I installed Eclipse, the sources of Archi and the sources of my plugin and generated the JAR file from MAC.

The JAR size is the same but the content is not 100% identical so I need to understand whare are these differences and may be I'll be ableto generate a JAR file that works for both systems :-)

herve91 commented 5 years ago

I close this issue as a workaround has been found. I hope I'll understand soon what happens.

achampion commented 5 years ago

Sorry but the ...1.0.10_for_mac.jar does not seem to fix the issue for me, and when I check for update it keeps offering me to download it. (It originally complained that I had both but was still using 1.0.10 so I deleted the original from the plugin directory so only the 1.0.10_for_mac.jar exists but still not rendering.

herve91 commented 5 years ago

Unfortunately, It works for me anf for other people ... As MAC is a very specific system and as I do not know well this system, I won't be ableto help you more on this subject I'm afraid.

Regarding the update procedure, it is not aware that there is a specific MAC version ... so until this MAC stuff is not solved definitively, you won't be able to use it.

Best regards Hervé

JiruSensei commented 5 years ago

Hi Hervé,

Sorry to disturb again with that old thread but I have some kind of similar issue and this time not only with my Mac. Actually I've got 3 computers on my desk with 3 different OS (macOS, Windows and Linux Ubuntu). On Windows it works pretty well (and it is really what I am looking for :-) but on both other OS it doesn't render at all. So I guess the issue is not macOS but more Unix like systems. The shame for me is that I am supposed to do modelling only on the Linux platform. Did you face already that issue on a Linux platform?

Best regards

Gilles

herve91 commented 5 years ago

Hi Gilles,

I know my plugins can have strange behaviour on MacOS, but I regularly check them on Linux and never experienced any issue. I just tried on a Ubuntu machine and it works well. _

Linux ubuntu16 4.15.0-29-generic #31~16.04.1-Ubuntu SMP Wed Jul 18 08:54:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

_ image

Could you please provide me with more information about your issue on Ubuntu ?

Best regards Hervé

JiruSensei commented 5 years ago

Hi Hervé and thanks for your fast reply.

Here is Linux version: 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux Java version: Java(TM) SE Runtime Environment (build 1.8.0_77-b03) Archi version: 4.3.1 build 201901281101 Specialization plugin: 1.0.10

I've just activated the Logger (after reload Archi) and while setting &a new Icon and new Label on a technology function I've got that message on the log: 2019-02-12 17:09:56 DEBUG 525:PreferencePage - Logger initialised. 2019-02-12 17:10:47 ERROR 1051:SpecializationPlugin - DiagramModelArchimateObject:"Technology Function" is not in a view not in a folder.

Which is a strange message since that element is clearly in a View and in the folder "Technology & Physical" Hope it will helps you ;-)

Anyway, this plugin looks great otherwise

Bon courage

Gilles

herve91 commented 5 years ago

I do not understand why you've got this error message ... So what I suggest is that you send me your phone number by mail and I'll call you tomorrow morning to conduct more tests.

Best regards Hervé

avina-z commented 5 years ago

I had to rename the plugin from org.archicontribs.specialization_v1.0.10.jar to org.archicontribs.specialization_1.0.10.jar (remove the "v" from the version sub-string) and that fixed the problem. I noticed this because when I build the plugin on my Eclipse Environment, the name of the created jar file was "org.archicontribs.specialization_1.0.10.jar" and it worked.

Then I downloaded again the plugin, renamed and installed and this time it worked!

herve91 commented 5 years ago

Hi Alberto,

Are you on MacOS as well ?

Best regards Hervé