Tuesday, November 29, 2011

Subclipse overlay icons

Lifted from http://stackoverflow.com/questions/3917925/what-do-the-arrow-icons-in-subclipse-mean/3920248#3920248 because something this valuable should be an article - not just an answer.

When working with the Subversion repository, remote changes (those on the repository) are incoming changes (remote → local), while local changes are outgoing changes (local → remote).

In views that compare the local and remote copies, incoming changes are denoted with a blue, left-facing arrow, while outgoing changes are denoted with a gray, right-facing arrow. These arrows may be decorated to indicate more specific operations.

The Package Explorer view, on the other hand, indicates a file's status with a different set of icons representing its local state. These icons are the ones most commonly seen, so let's start with them:

Ignored File - A file ignored by version control. You can control what resources will be ignored by going to Window → Preferences → Team → Ignored Resources.
Unversioned File - A file not under version control. These are typically new files that you have not committed to the repository yet.
New File - A versioned file that needs to be added to the remote repository. These are typically files you have either renamed, or moved to a different directory.
Deleted File - A deleted folder. These are folders that you have deleted locally without yet committing the changes to the repository. Note that files are usually removed from the view when they're deleted locally, so they are normally not seen with this icon.
Synchronized File - A file with no local changes.
Local Changes - A file with local, uncommitted changes.
Locked File - A locked file.
Conflicted File - A conflicted file. These are typically files that had a commit/update conflict that you marked to resolve later.
Tree Conflicted File - A file that has a tree conflict. These are typically files that have local changes, but have since been moved, removed, or renamed in the repository since the last local copy update.
External File - A file that is external to the project. Linked external files cannot be committed to the repository.
Switched File - A file that has been switched. These are files which belongs to a different working copy than their local parent directory.

In a synchronization view (e.g. via Synchronize with Repository or Commit), as previously described, there are icons which indicate which direction a change is occurring in as well as additional information about that change. These are described below:

Outgoing
Commit Changes - A file whose contents have been modified and will be committed to the repository.
Commit Addition - A file that will be newly added to the repository. This may coincide with a file removal in cases where a file is moved or renamed..
Commit Removal - A file that will be removed from the repository. This may coincide with a file addition in cases where a file is moved or renamed.
Property Change - A file with property changes, in the Commit dialog. On the Synchronize tab, property changes are currently reflected as a normal file modification (Commit Changes).

Incoming
Remote Changes - A file that has content changes committed to the repository that will be applied to the local copy.
Pull Addition - A new file that will be added to the local copy from the repository. Like the outgoing file addition, this may be the result of a move or rename.
Pull Removal - A file that will be removed from the local copy because it has been removed from the repository. Like the outgoing file removal, this may be the result of a move or rename.

Conflict
Conflicting Versions - A file that has been changed in both the local copy and repository independently, causing a need for conflict resolution. Fixing this condition involves opening up the conflict view or forcibly overwriting changes locally or remotely.
Synchronization Tree Conflict - A file that has a tree conflict. This can occur when there are new changes to a file on one end (either local or remote), and the file is moved, removed, or renamed on the other.

Finally, the Synchronize with Repository option opens the Synchronize tab (Synchronize Tab) with the following buttons:

Synchronize Source - Synchronizes the local copy with the currently selected repository when clicked. Selecting from the drop-down allows switching between different remote code bases.
Show Incoming - Shows only incoming changes (remote → local).
Show Outgoing - Shows only outgoing changes (local → remote).
Show Incoming and Outgoing - Shows both incoming and outgoing changes (remote ↔ local).
Show Conflicts - Shows conflicting changes.
Update Incoming - Updates all local resources with incoming changes after prompt.
Commit Outgoing - Brings up the commit dialog to commit all outgoing changes.
Show Changesets - Breaks up the change lists by revisions.

There are a few other views which weren't covered that have additional icons, but this should hopefully be a good start. Let me know if there is anything important missing, or any of these descriptions seem to differ from your actual experience.

Salesforce.com activity - parent field is Subject

I needed to be able to restrict the criteria for a Salesforce.com workflow rule so that it was only triggered if an activity belonging to a particular custom object was changed.

To identify the object type I wanted to check the first 3 characters in the GUI field that's equivalent to the API WhatId.

Finding out from googleland which field I should use for this was surprisingly fruitless. Wrong choices:

  • Opportunity/AccountId
  • Contact/LeadId

Through trial and error it turns out that Subject was the right field! (!?!?Subject!?!?)

So my simple filter looks like "Subject starts with a99"

Wednesday, November 23, 2011

Finding my way around the Force.com Eclipse IDE

I find that it's easy to accidentally close tabs and views in Eclipse, or send them to Fast View. The bottom right panel in particular seems to have a high mistake rate for me.

Views are easy to bring back if they were accidentally closed:

Force.com views - e.g. Window: Show View: Problems
Standard Eclipse views used by the Force.com perspective - e.g. Window: Show View: Other: Progress

If the views aren't visible after using Show View then they have probably ended up in Fast View.


Fast view is in the bottom left corner. In the image shown there are two icons: the Fast View menu and the Progress view.

To rescue the Progress view, click it and it will be displayed on top of the Project Explorer. Then move the view back to its rightful place.

To rescue other views, select the view you want from the Fast View menu and move it.

Don't select views in the Fast View menu that are already in the right place - they will disappear into Fast View.