Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Resolve circular dependency between org.eclipse.mylyn.monitor.* and org.eclipse.mylyn.context.* (#16) #17

Closed
wants to merge 9 commits into from

Conversation

BeckerFrank
Copy link
Contributor

No description provided.

Copy link
Contributor

@ruspl-afed ruspl-afed left a comment

Choose a reason for hiding this comment

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

We should use either extension point or OSGi component to rework circular dependency.

New bundle seems to be not added to pom.xml and any feature.xml


private static CommonContextPlugin INSTANCE;

private ContextCallBack contextCallBack;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please do not introduce this mutability, we will have a lot of troubles with it:

  • who and then should set it
  • how to make sure that it is already set before we need it
  • and so on

}
MonitorUiPlugin.getDefault().notifyInteractionObserved(navigationEvent);
}
throw new UnsupportedOperationException("should be handeled in AbstractContextInteractionMonitor");
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be very surprising implementation change

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension-point id="ContextCallBack" name="Context CallBack" schema="schema/ContextCallBack.exsd"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's reduce the extension point id to a single word, without camel case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we change this to communicator?

Copy link
Contributor

Choose a reason for hiding this comment

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

Whatever describes it better from you PoV.
I also would think twice if we can have many of them, in that case "communicators"

</complexType>
</element>

<element name="ContextCallBack">
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's reduce the element name to a single word, without camel case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we change this to communicator?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, why not.

Bundle-Version: 3.26.0.qualifier
Bundle-Activator: org.eclipse.mylyn.common.context.CommonContextPlugin
Bundle-Vendor: %Bundle-Vendor
Export-Package: org.eclipse.mylyn.common.context
Copy link
Contributor

Choose a reason for hiding this comment

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

I would mark this package "internal", until we have stable API

}

}
return contextCallBack;
Copy link
Contributor

Choose a reason for hiding this comment

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

still can be null at this point, I suggest to provide a stub implimintation instead of null for such a case

if (extensions.length > 0) {
IConfigurationElement[] elements = extensions[0].getConfigurationElements();
for (IConfigurationElement element : elements) {
if (element.getName().compareTo(CONTEXT_CALL_BACK) == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please consider Objects.equals we don't need deep and precise compareTo here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will be in the next commit for the branch

@wimjongman
Copy link
Member

Guys, sorry for the slow response. I am giving training all day every day this week. No minute left.

@BeckerFrank
Copy link
Contributor Author

Why the request tell me that I have 1 change requested?
Sorry did not see what I have to do.

@BeckerFrank
Copy link
Contributor Author

We continue with this work in #31

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants