-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix for #1403 - makes Actions visible in Designer #2967
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,10 @@ Bundle-Activator: org.openhab.action.homematic.internal.HomematicActivator | |
| Bundle-ManifestVersion: 2 | ||
| Bundle-Description: This is the Homematic action of the open Home Aut | ||
| omation Bus (openHAB) | ||
| Import-Package: org.openhab.core.items, | ||
| Import-Package: org.openhab.binding.homematic.internal.common, | ||
| org.openhab.binding.homematic.internal.communicator.client, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A bundle must not import internal packages from other bundles!
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Absolutely right and we should change this (out of the scope of this Bugfix). What i changed was simply removing the require-bundle deep and add the import-package instead. @gerrieg could you please take care of this and create another PR moving the externally required classes in the appropriate package?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, there shouldn't even a dependency from an action bundle to a binding bundle at all. The shared code should rather be externalized into an io bundle as it is e.g. done for squeezebox.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kaikreuzer is it true that an action bundle should not depend on a binding bundle even in the case where its actions functioning are intentionally dependent on a properly configured and running binding, where each action call's first parameter is an item bound to the binding?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This imho mixes actions and bindings too heavily. An action should never really refer to an item where you need to know that a specific binding is configured to.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see issue #2969 |
||
| org.openhab.binding.homematic.internal.communicator.client.interfaces, | ||
| org.openhab.core.items, | ||
| org.openhab.core.library.items, | ||
| org.openhab.core.library.types, | ||
| org.openhab.core.scriptengine.action, | ||
|
|
@@ -24,4 +27,3 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.6 | |
| Service-Component: OSGI-INF/action.xml | ||
| Bundle-ClassPath: . | ||
| Bundle-ActivationPolicy: lazy | ||
| Require-Bundle: org.openhab.binding.homematic;bundle-version="1.5.0" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,10 +11,12 @@ Bundle-ManifestVersion: 2 | |
| Bundle-Description: This is the TinkerForge action of the open Home Aut | ||
| omation Bus (openHAB) | ||
| Import-Package: org.apache.commons.lang, | ||
| org.openhab.core.scriptengine.action, | ||
| org.openhab.binding.tinkerforge.ecosystem, | ||
| org.openhab.binding.tinkerforge.internal.model, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A bundle must not import internal packages from other bundles!
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Absolutely right and we should change this (out of the scope of this Bugfix). What i changed was simply removing the require-bundle deep and add the import-package instead. @theoweiss could you please take care of this and create another PR moving the externally required classes in the appropriate package?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, there shouldn't even a dependency from an action bundle to a binding bundle at all. The shared code should rather be externalized into an io bundle as it is e.g. done for squeezebox.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, true … there are two options: a) remove the Action from the Designer due to this flaw or b) accept it for now, fix this issue and work on it afterwards
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am aware that it was not introduced by this PR and thus should also not block this PR. I just wanted to mention that there is a problem that should not have been merged in the first place and I hope there is already an existing issue entry to "work on it afterwards" - otherwise things tend to never get fixed.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. agreed, see #2968 |
||
| org.openhab.core.items, | ||
| org.openhab.core.library.items, | ||
| org.openhab.core.library.types, | ||
| org.openhab.core.scriptengine.action, | ||
| org.openhab.core.types, | ||
| org.osgi.framework, | ||
| org.osgi.service.cm, | ||
|
|
@@ -25,5 +27,4 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.7 | |
| Service-Component: OSGI-INF/action.xml | ||
| Bundle-ClassPath: . | ||
| Bundle-ActivationPolicy: lazy | ||
| Require-Bundle: org.openhab.binding.tinkerforge;bundle-version="1.7.0", | ||
| org.eclipse.emf.ecore | ||
| Require-Bundle: org.eclipse.emf.ecore | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bundle must not import internal packages from other bundles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely right and we should change this (out of the scope of this Bugfix). What i changed was simply removing the require-bundle deep and add the import-package instead. @gerrieg could you please take care of this and create another PR moving the externally required classes in the appropriate package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see issue #2969