Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot select workspace mechanic configuration file #202

Closed
akronenw opened this issue Apr 19, 2022 · 6 comments
Closed

Cannot select workspace mechanic configuration file #202

akronenw opened this issue Apr 19, 2022 · 6 comments
Assignees
Milestone

Comments

@akronenw
Copy link

Hi,
I am trying to use a workspace mechanic configuration file but whenever I choose it, the plugin keeps saying:
Invalid file. Please enter a valid configuration file..

I had a look at the source code, in the method valid in class EclipseJavaFormatterOptionsPanel there is this line:
if (!fileExists || (!isXML && !isEPF && !isProjectSetting) || cbProfile.getSelectedIndex() < 0) {
where I suppose is the problem. cbProfile is only selectable for configuration files that are xml-based and I guess the selected index is < 0 then.

Can you help me out here?

Best
Alex

@funfried
Copy link
Owner

Hi Alex,

I have to admit, I never used that feature myself, it was already there when I took over the plugin from markiewb. Can you provide me your workspace mechanic file? I'll look into it. And also thanks for the hint, totally possible that this is the cause of the issue.

Cheers,
Fabian

@akronenw
Copy link
Author

akronenw commented Apr 20, 2022

Hi Fabian,

please see attached file. Do not forget to cjhange the file extension to ".epf".

Best
Alex

P.S.: I build the plugin on my machine with jdk17 which worked fine, but after installing it to the IDE (NetBeans 13) I see an exception in the log:
An error occurred during parsing of '/home/alex/devdata/externalcodeformatter_for_netbeans/src/main/java/de/funfried/netbeans/plugins/external/formatter/java/eclipse/ui/EclipseJavaFormatterOptionsPanel.java'. Please report a bug against java/source and attach dump file '/home/alex/.netbeans/13/var/log/EclipseJavaFormatterOptionsPanel_6.dump'.

Do you have any experience using the plugin with jdk17? Do you want me to file a dedicated issue?

java-imports.txt

@funfried
Copy link
Owner

@akronenw

I did not compile the plugin against jdk17 so far, not sure why this should cause any trouble, but yes please file another issue. Maybe I can fix that somehow, but as plugins built with jdk11 are supported by jdk17, I don't think that's a serious topic, but I would like to keep track of it. Thanks for telling me.

funfried added a commit that referenced this issue May 2, 2022
Fixed error when selecting an EPF workspace mechanic configuration, the UI showed an issue which actually was none
@funfried
Copy link
Owner

funfried commented May 3, 2022

@akronenw In the latest SNAPSHOT version (1.15.0) this bug should be fixed, would be great if you could confirm that.

Cheers,
Fabi

@akronenw
Copy link
Author

akronenw commented May 4, 2022

Hello Fabian,

I just installed the snapshot version and the issue has disappeared. As far as I can tell, the EPF is correctly interpreted.

Thanks for the fix!
Best
Alex

@funfried
Copy link
Owner

funfried commented May 4, 2022

Thanks for your feedback! I guess I'll make the final release within the next days so it will be available through the NetBeans Plugin Center soon.

@funfried funfried added this to the 1.15.0 milestone May 4, 2022
@funfried funfried self-assigned this May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants