Bug 1078763 - Import suggestions should act as a mask for imports
Summary: Import suggestions should act as a mask for imports
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: DR1
: 6.3.0
Assignee: manstis
QA Contact: Tomas David
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-20 10:01 UTC by Toni Rikkola
Modified: 2020-03-27 20:04 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-03-27 20:04:48 UTC
Type: Enhancement
Embargoed:


Attachments (Terms of Use)
Jar for reproducing (3.00 KB, application/java-archive)
2014-03-20 10:01 UTC, Toni Rikkola
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1007887 0 low CLOSED The Import section for Guided editors only allows to import one fact at a time 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1081552 0 unspecified CLOSED Models not available for rules - errors during deployment 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1132383 0 high CLOSED Guided Editor does not see classes from external JAR 2021-02-22 00:41:40 UTC

Internal Links: 1007887 1081552 1132383

Description Toni Rikkola 2014-03-20 10:01:14 UTC
Created attachment 876759 [details]
Jar for reproducing

Steps to Reproduce:
1. Add the jar into internal m2 repo
2. Add the jar into project dependencies
3. Add org.test1.A and org.test2.B into import suggestions
4. Build & Deploy the project

Actual results:
Problems panel shows that imports A and B can not be resolved.

Expected results:
No items in Problems panel.

Additional info:
The build deploys ok.
A and B can be used in editor. The problem is just that the message is misleading.

Comment 2 Toni Rikkola 2014-03-20 11:14:06 UTC
Update. 
Currently the A and B do not need to be added to import suggestions They are automatically picked up from the jar. 

In the future the goal should be to make import suggestions act as a mask for import options in the editors.

Benefits:
* If a jar with 1000 classes are added and only few of them are needed, the editor's import tab does not show 1000 items.
* The project admin has the control to declare what facts can be used in the guided editors. An user that only has access to guided editor can not break the package by using the wrong Person fact if there are more than one available
* This will unify the way imports are done. Currently imports from java.lang.* need to be added using import suggestions, in order for them to show up in guided editors.
* In the future we might want to use aliases for the imports. org.test.Person could be masked as "User" or "Persona" if the users are spanish.

Comment 3 Toni Rikkola 2015-12-07 13:47:30 UTC
This is now done with white list. Import suggestions only works for JRE classes.

Comment 4 Tomas David 2016-03-23 14:43:06 UTC
Verified with BRMS 6.3.0.ER1.


Note You need to log in before you can comment on or make changes to this bug.