Tuesday, August 21, 2012

How to send email to a group and exclude members of some other groups

Imagine the situation - you just sent an announcement e-mail to a few departments of your organization. For simplicity, let's assume that you have used appropriate LDAP groups "A", "B" & "C". And then you realize that you have forgotten to add one more group "D" to the recipients list. And this forgotten group "D" contains some users from "A", "B" or "C" as well as some unique users.

You don't want to "spam" dozens of guys from "A", "B" & "C" again, don't you?

Unfortunately, Outlook doesn't have "Not to" field, so you have to prepare a filtered list of recipients:
"D*" = "D" - ("A" + "B" + "C")

  • Use Outlook to expand "A", "B" & "C" groups to the list of users
  • Copy ";" separated list to Word and replace all "; " by line breaks "^l"
  • Put resulting list to Excel as first column
  • Repeat the same steps for group "D" and put resulting list as second column
  • In Excel, select it all and choose "Conditional Formatting" - "Higlight Cell Rules" - "Duplicate Values"
  • Filter second column to only show "unique" or not highlighted values
  • Et viola - You have a list of people who are in "D" but not in "A", "B" or "C"!
  • Copy the list back to the Outlook message in the "To:" field and click "Check names"

Tuesday, August 14, 2012

Exporting and importing Eclipse workbench layout



Eclipse workbench layout defines which workspaces, views, shortcuts, toolbars and menus are active, as well as their size and position.


Eclipse 3.x doesn't store workbench layout in preferences, so the only way to share same layout among multiple workspaces is to copy ".metadata/.plugins/org.eclipse.ui.workbench/workbench.xml" from one workspace to another.


Wednesday, August 1, 2012

Eclipse: generate JUnit test for the method using shortcut

By default Eclipse only can generate JUnit test class for an existing Java class. If you'll change original class by adding new method you'll need to manually add appropriate test method to the JUnit test. 
Using free FastCode Eclipse plug-in you will be able to do that by the single shortcut "Ctrl + Alt + Shift + U"