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

JBIDE-17911 Make "full tree" vs. "funtions and macro defs." configurable #21

Merged
merged 4 commits into from
Aug 11, 2014

Conversation

ppalaga
Copy link
Contributor

@ppalaga ppalaga commented Jul 18, 2014

for Freemarker outline plus some refactoring to avoid usage of
deprecated Prefence APIs.


@Override
public void stop(BundleContext context) throws Exception {
Preferences.getInstance().dispose();
Copy link
Member

Choose a reason for hiding this comment

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

It doesn't feel right. Why it is required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It disposes SWT Colors linked in Preferences. I have read somewhere that Colors need to be disposed manually (do they not?) or is this not the right place to invoke Preferences.dispose()?

Copy link
Member

Choose a reason for hiding this comment

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

I agree, but then it should be

try {
   Preferences.getInstance().dispose();
} finally {
   super.stop(context);
} 

Copy link
Contributor Author

Choose a reason for hiding this comment

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

+1 will be added in a new commit in this PR

Editor.addProblemMarker(String, int) and log it rather than ignore
if (null != file)
this.lastUpdatedTime = file.getModificationStamp();
}
catch (Exception e) {
} catch (Exception e) {
Copy link
Member

Choose a reason for hiding this comment

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

This catch block is not required, what kind of exception is expected 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.

I do not know because I have not written that code and I had no reason to get acquanted with this particular method. The intention behind the present commit was code formatting and some basic refactoring without any behavior change. Although I agree that catch (Exception e) is generally not a good practice, this particular issue is out of the present scope.

@ppalaga
Copy link
Contributor Author

ppalaga commented Aug 1, 2014

@dgolovin, I hope to have addressed all your comments. From my PoV, the last three commits can be squashed together.

@dgolovin dgolovin merged commit 7e55a9b into jbosstools:master Aug 11, 2014
@dgolovin
Copy link
Member

released to master

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