<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4373291396601529313</id><updated>2024-11-01T16:04:02.683+05:30</updated><category term="Eclipse"/><category term="Git"/><category term="Design/OOAD"/><category term="E4"/><category term="IO"/><category term="Code Review"/><category term="Console"/><category term="Deisgn/OOAD"/><category term="Design/General"/><category term="EMF"/><category term="File"/><category term="Threads"/><title type='text'>SS DOTS</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ssdots.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default'/><link rel='alternate' type='text/html' href='http://ssdots.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sami</name><uri>http://www.blogger.com/profile/10263234767167375767</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4373291396601529313.post-1279528510113518020</id><published>2015-08-20T17:13:00.000+05:30</published><updated>2015-08-20T17:17:11.595+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="EMF"/><category scheme="http://www.blogger.com/atom/ns#" term="IO"/><title type='text'>Converting org.eclipse.emf.common.util.URI to Java.io.File</title><summary type="text">




Code snippet:

URI resolvedFile = CommonPlugin.resolve(uri);
String fileString = resolvedFile.toFileString();
File file = new File(fileString);

Thats it. You have got the File now.

org.eclipse.emf.common.CommonPlugin - Include this in your import and manifest.
</summary><link rel='replies' type='application/atom+xml' href='http://ssdots.blogspot.com/feeds/1279528510113518020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ssdots.blogspot.com/2015/08/converting-orgeclipseemfcommonutiluri.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/1279528510113518020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/1279528510113518020'/><link rel='alternate' type='text/html' href='http://ssdots.blogspot.com/2015/08/converting-orgeclipseemfcommonutiluri.html' title='Converting org.eclipse.emf.common.util.URI to Java.io.File'/><author><name>Sami</name><uri>http://www.blogger.com/profile/10263234767167375767</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4373291396601529313.post-2156861373034138867</id><published>2015-04-16T22:58:00.002+05:30</published><updated>2015-04-16T23:13:11.077+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="E4"/><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="File"/><category scheme="http://www.blogger.com/atom/ns#" term="IO"/><title type='text'>Eclipse RCP: Reading text file resource to a string</title><summary type="text">


Code Snippets which is used to convert a text file inside a Eclipse RCP to a String.

Create a PluginResourceToString object and make a call to convertToString method with the filePath as the argument.

If in your plugin, resources is the directory containing text files to be read, and if the name of the text file is example.text. The parameter should be resources/example.text. Make sure that </summary><link rel='replies' type='application/atom+xml' href='http://ssdots.blogspot.com/feeds/2156861373034138867/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ssdots.blogspot.com/2015/04/eclipse-rcp-reading-text-file-resource.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/2156861373034138867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/2156861373034138867'/><link rel='alternate' type='text/html' href='http://ssdots.blogspot.com/2015/04/eclipse-rcp-reading-text-file-resource.html' title='Eclipse RCP: Reading text file resource to a string'/><author><name>Sami</name><uri>http://www.blogger.com/profile/10263234767167375767</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4373291396601529313.post-6493413977161837455</id><published>2015-04-13T17:19:00.000+05:30</published><updated>2015-04-13T17:19:37.447+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Console"/><category scheme="http://www.blogger.com/atom/ns#" term="E4"/><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse"/><title type='text'>Eclipse 4 (E4) : Creating Eclipse RCP Headless (Command line) Application </title><summary type="text">




Simple way to create RCP Headless application is to define Trimmed window in the application model and making it as non visible / non to be rendered.

If made non visible, there will be no window launched and application will continue to run in the background. Only way to close application is to kill (If you don&#39;t run it with -consoleLog).

If made not to be rendered, application will run </summary><link rel='replies' type='application/atom+xml' href='http://ssdots.blogspot.com/feeds/6493413977161837455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ssdots.blogspot.com/2015/04/eclipse-4-e4-creating-eclipse-rcp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/6493413977161837455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/6493413977161837455'/><link rel='alternate' type='text/html' href='http://ssdots.blogspot.com/2015/04/eclipse-4-e4-creating-eclipse-rcp.html' title='Eclipse 4 (E4) : Creating Eclipse RCP Headless (Command line) Application '/><author><name>Sami</name><uri>http://www.blogger.com/profile/10263234767167375767</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4373291396601529313.post-7157842380420662096</id><published>2015-03-03T18:52:00.000+05:30</published><updated>2015-03-03T18:52:20.881+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse"/><title type='text'>Dependency Injection: Common Plugins, Annotations &amp; Usage in Eclipse E4</title><summary type="text">




The plugins that provide common annotations for DI (Dependency Annotations) in Eclipse E4 are

javax.inject
javax.annotation
org.eclipse.e4.core.di
org.eclipse.e4.ui.services

The common annotations are

@Inject
@PostConstruct
@PreDestroy
@Optional
@Named
@Creatable

The common Interfaces and Constants are present in interface IServiceConstants.

Usage and Explanations:

@Inject - Used for </summary><link rel='replies' type='application/atom+xml' href='http://ssdots.blogspot.com/feeds/7157842380420662096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ssdots.blogspot.com/2015/03/dependency-injection-common-plugins.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/7157842380420662096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/7157842380420662096'/><link rel='alternate' type='text/html' href='http://ssdots.blogspot.com/2015/03/dependency-injection-common-plugins.html' title='Dependency Injection: Common Plugins, Annotations &amp; Usage in Eclipse E4'/><author><name>Sami</name><uri>http://www.blogger.com/profile/10263234767167375767</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4373291396601529313.post-3842420891795124064</id><published>2015-02-25T15:32:00.002+05:30</published><updated>2015-02-25T15:32:26.425+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Code Review"/><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="Git"/><title type='text'> Doing peer code review in Git and Eclipse (Java/C++)</title><summary type="text">





Peer code reviews will help a lot during coding stage to ensure the correctness of the code.



We know that doing smaller commits will minimize the bugs.



Combining the above two will really help to have a better code.



Following can be a tip to do a peer code review if you use Git.





Developer does a rebase and do a smaller commit.
Developer creates patch with git format-patch -1  </summary><link rel='replies' type='application/atom+xml' href='http://ssdots.blogspot.com/feeds/3842420891795124064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ssdots.blogspot.com/2015/02/doing-peer-code-review-in-git-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/3842420891795124064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/3842420891795124064'/><link rel='alternate' type='text/html' href='http://ssdots.blogspot.com/2015/02/doing-peer-code-review-in-git-and.html' title=' Doing peer code review in Git and Eclipse (Java/C++)'/><author><name>Sami</name><uri>http://www.blogger.com/profile/10263234767167375767</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4373291396601529313.post-2607229836516969546</id><published>2015-02-24T12:18:00.002+05:30</published><updated>2015-02-24T12:19:17.855+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Git"/><title type='text'>Git - Difference (Compare) between two commits (sha)</title><summary type="text">




Given two different SHAs (Commit Ids), you might want to view the difference between them and compare.

You can do this by

git difftool  

The above will launch the difftool for each file in sha1 and sha2.

If you want to view only the file names,

git diff --name-only  

Reference: StackOverflow


</summary><link rel='replies' type='application/atom+xml' href='http://ssdots.blogspot.com/feeds/2607229836516969546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ssdots.blogspot.com/2015/02/git-difference-compare-between-two.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/2607229836516969546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/2607229836516969546'/><link rel='alternate' type='text/html' href='http://ssdots.blogspot.com/2015/02/git-difference-compare-between-two.html' title='Git - Difference (Compare) between two commits (sha)'/><author><name>Sami</name><uri>http://www.blogger.com/profile/10263234767167375767</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4373291396601529313.post-6694445765450293961</id><published>2015-02-24T11:56:00.002+05:30</published><updated>2015-02-24T11:56:49.738+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Git"/><title type='text'>Git - Create and Track Remote Branch</title><summary type="text">




You many want to create a new local branch and track the remote branch.

You can do this by

git branch --track  &amp;nbsp;

Where  is the complete path of remote branch including remotes/origin/...


</summary><link rel='replies' type='application/atom+xml' href='http://ssdots.blogspot.com/feeds/6694445765450293961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ssdots.blogspot.com/2015/02/git-create-and-track-remote-branch.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/6694445765450293961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/6694445765450293961'/><link rel='alternate' type='text/html' href='http://ssdots.blogspot.com/2015/02/git-create-and-track-remote-branch.html' title='Git - Create and Track Remote Branch'/><author><name>Sami</name><uri>http://www.blogger.com/profile/10263234767167375767</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4373291396601529313.post-3794688908306759099</id><published>2015-02-05T15:45:00.000+05:30</published><updated>2015-02-05T15:47:38.787+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="Threads"/><title type='text'>When to use Threads</title><summary type="text">




Thumb rule to use Threads in the code


If the operation (i.e. the method) that needs to be called is provided by external system (i.e. operation not belonging to your project).
If the execution time of operation is unknown or big
If the operation is not an UI related.

If the operation is UI related, typically it has to be run in the UI thread.
Never launch a thread and call the UI </summary><link rel='replies' type='application/atom+xml' href='http://ssdots.blogspot.com/feeds/3794688908306759099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ssdots.blogspot.com/2015/02/when-to-use-threads-how.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/3794688908306759099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/3794688908306759099'/><link rel='alternate' type='text/html' href='http://ssdots.blogspot.com/2015/02/when-to-use-threads-how.html' title='When to use Threads'/><author><name>Sami</name><uri>http://www.blogger.com/profile/10263234767167375767</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4373291396601529313.post-5946858076906397731</id><published>2012-08-14T22:25:00.001+05:30</published><updated>2015-01-12T11:09:49.248+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Deisgn/OOAD"/><title type='text'>Object Oriented Analysis and Design - The process</title><summary type="text">
As with every product development, software development has its stages:



Analysis,
Design,
Implementation and Unit Testing,
Integration
Verification.







The various process like

Waterfall,
RUP (Rational Unified Process),
Agile and
Lean&amp;nbsp;

tells us various way of working on these stages. The best way of working is decided by the team, usually by the ones who has authority and chosen </summary><link rel='replies' type='application/atom+xml' href='http://ssdots.blogspot.com/feeds/5946858076906397731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ssdots.blogspot.com/2012/08/object-oriented-analysis-and-design.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/5946858076906397731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/5946858076906397731'/><link rel='alternate' type='text/html' href='http://ssdots.blogspot.com/2012/08/object-oriented-analysis-and-design.html' title='Object Oriented Analysis and Design - The process'/><author><name>Sami</name><uri>http://www.blogger.com/profile/10263234767167375767</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4373291396601529313.post-330559604407091857</id><published>2012-08-04T22:08:00.002+05:30</published><updated>2015-01-12T11:07:23.046+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Design/General"/><category scheme="http://www.blogger.com/atom/ns#" term="Design/OOAD"/><title type='text'>Procedural oriented analysis, design and programming - The world before OOAD</title><summary type="text">

Before going in to discuss what is OOAD, we have to understand how we &#39;think&#39; usually.

While there could be many thinking that exists before OO, it is very common to think in procedural oriented way as that was the latest development before OO has come to party.

So what is that thinking and what is the procedural way, a short recap:

As the software development happens only when there is a </summary><link rel='replies' type='application/atom+xml' href='http://ssdots.blogspot.com/feeds/330559604407091857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ssdots.blogspot.com/2012/08/procedural-oriented-analysis-design-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/330559604407091857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/330559604407091857'/><link rel='alternate' type='text/html' href='http://ssdots.blogspot.com/2012/08/procedural-oriented-analysis-design-and.html' title='Procedural oriented analysis, design and programming - The world before OOAD'/><author><name>Sami</name><uri>http://www.blogger.com/profile/10263234767167375767</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4373291396601529313.post-1302387060708418168</id><published>2012-07-22T18:57:00.000+05:30</published><updated>2015-01-12T11:09:31.863+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Design/OOAD"/><title type='text'>Object Oriented Analysis and Design - An Introduction</title><summary type="text">
What is Object Oriented Analysis and Design?





Martin Fowler in his book &quot;UML distilled&quot; says you will one day realize that you have got the Object Oriented thinking in you. And I have realized the same!



Its a Paradigm which you will get in you without knowing that you have got it!


Someone who has done programming in a procedural oriented programming in college, student project or in </summary><link rel='replies' type='application/atom+xml' href='http://ssdots.blogspot.com/feeds/1302387060708418168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ssdots.blogspot.com/2012/07/design-patterns.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/1302387060708418168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4373291396601529313/posts/default/1302387060708418168'/><link rel='alternate' type='text/html' href='http://ssdots.blogspot.com/2012/07/design-patterns.html' title='Object Oriented Analysis and Design - An Introduction'/><author><name>Sami</name><uri>http://www.blogger.com/profile/10263234767167375767</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2qHMDAX-lhZGNgalQcHjulEIpnrOr4egsbMfiGdSJyqhLLVGi9cJvZIaVQxDAEuxi1HKoRN_dA2jfokH1zEah0QDoMFUShEyCZIKl0MzE24mrMUfGXPHbNf7XANDsAlR5Ms8XKWPBbjs/s72-c/whatisooad.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>