Skip to content

Conversation

@nburnwal09
Copy link

Issue: #1945
Exception is caught to open the target editor when a version is malformed.

@github-actions
Copy link

github-actions bot commented Dec 19, 2025

Test Results

   771 files  ±0     771 suites  ±0   54m 16s ⏱️ - 7m 48s
 3 648 tests ±0   3 593 ✅  - 1   54 💤 ±0  1 ❌ +1 
10 878 runs  ±0  10 714 ✅  - 1  163 💤 ±0  1 ❌ +1 

For more details on these failures, see this check.

Results for commit 91283ae. ± Comparison against base commit 7f53861.

♻️ This comment has been updated with latest results.

@nburnwal09 nburnwal09 force-pushed the p2inf_editor branch 2 times, most recently from 7e72db5 to a606e61 Compare January 12, 2026 07:01
@nburnwal09
Copy link
Author

@HannesWell @laeubi
I have added a few IllegalArgumentExceptions here for the issue.

The test case is failing for UpdateUnitVersionsCommandTests.java at function (confirmVersionUpdates.)
The failure doesn’t appear to be related to my changes. I’ve also noticed similar test failures occurring across other PRs. Could you please confirm if this is likely a false positive?

assertEquals("ID: " + expectedID + " has the incorrect version. updatedText=" + updatedText,

@vogella
Copy link
Contributor

vogella commented Jan 19, 2026

@ptziegler can you also have a look?

@vogella
Copy link
Contributor

vogella commented Jan 19, 2026

@HannesWell @laeubi I have added a few IllegalArgumentExceptions here for the issue.

The test case is failing for UpdateUnitVersionsCommandTests.java at function (confirmVersionUpdates.) The failure doesn’t appear to be related to my changes. I’ve also noticed similar test failures occurring across other PRs. Could you please confirm if this is likely a false positive?

assertEquals("ID: " + expectedID + " has the incorrect version. updatedText=" + updatedText,

#2187 is supposed to improve the failing test.

TargetEditor_4=Target Editor
TargetEditor_5=Unable to load target definition model. Fix the target definition model in Source View.
TargetEditor_6=The editor input ''{0}'' is not supported.
TargetEditor_7=Unable to parse the IU version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TargetEditor_7=Unable to parse the IU version
TargetEditor_7=Unable to parse the IU version. Fix the target definition model in Source View.

I generally not only like if an error message tells me what's wrong, but also how to fix it.

Comment on lines +567 to +569
} catch (IllegalArgumentException e) {
fTarget = service.newTarget();
throw new CoreException(Status.error(e.getMessage(), e));
Copy link
Contributor

@ptziegler ptziegler Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
} catch (IllegalArgumentException e) {
fTarget = service.newTarget();
throw new CoreException(Status.error(e.getMessage(), e));
}

I don't think catching the exception here is a good idea. If you do this, the editor will automatically switch to the source tab without showing the error dialog.

Additionally you can freely switch from the source tab to any other tab, without the dialog appearing. You need to go back to the source tab first and only then will the dialog appear, when trying to switch to a different tab again.

Without this catch block, the editor tries to open the definition tab, show the error dialog and then switches to the source tab.

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

Successfully merging this pull request may close these issues.

4 participants