Search This Blog

Monday, 29 July 2013

For getting AVD or Android SDK Manager tool options in Eclipse Juno 4.2.1

Not able to see sdk manager tool in Eclipse (If Already Installed)

For getting sdk manager tool options in Eclipse Juno 4.2.1 Simple steps.

Window---->Customize Perspective--->Command Groups Availability

And then Simply check Android SDK and AVD Manager.


----------------------------------------------------------------------------------------
Install the ADT Plugin (In case not Installed)

 check the following link  [Install ADT Pluginto install the ADT plugin into your Eclipse.

----------------------------------------------------------------------------------------

Updating the ADT Plugin (In case not Updated)
To update the ADT plugin to the latest version, follow these steps:
  1. Select Help > Check for Update ...
  2. If any update for ADT or Android tools is available, select and install.
----------------------------------------------------------------------------------------

Sunday, 19 May 2013

How to change SVN-credentials in Eclipse

For Windows Users :-

Goto C:\Users\%User_Name%\AppData\Roaming\Subversion and remove the auth directory.
 Just be aware if you are connected to more than 1 SVN server that this will remove the authentication for all of the SVN servers you have configured.

 If you want to reset just a single server:
Inside the auth directory you should see a folder called svn.simple.
Open each of those files with a text editor to determine which one to remove and then remove just that single file.

say: Goto the following location in ur system --

 C:\Users\%User_Name%\AppData\Roaming\Subversion\auth\svn.simple            (On Windows 7)
--OR--
 C:\Documents and Settings[username]\Application Data\subversion\auth\svn.simple   (On versions previous to Windows 7)

 Delete the Hexadecimal file present over there (under the 'svn.simple' directory).
Now the next time you will hit any svn operations it will again ask for your svn credentials..you can reset over here again.

 NOTE: 
Incase you cannot find the APPDATA directory/folder ---do check for the hidden folders option / if some of the folders under C:\Users\'#UserName#'\ are not Hidden.

-----------------------------------------------------------------------------------------------------------


For Mac OS X ,i guess this would work :-

Goto folder /$HOME (/Users/{user home}/). You will see file '.eclipse_keyring'. Remove it. All saved credentials will be lost.
Now the next time you Restart Eclipse or Hit any svn-operations(Team-update/commit/etc) it will again ask for your svn credentials.
Now,you can reset over here once again.




-----------------------------------------------------------------------------------------------------------

This may Interest You :

Subclipse does not collect or store username and password credentials when defining a repository.
This is because the JavaHL and SVNKit client adapters are intelligent enough to prompt you for this information when they need to -- including when your password has changed.

    You can also allow the adapter to cache this information and a common question is how do you delete this cached information so that you can be prompted again?
We have an open request to have an API added to JavaHL so that we could provide a UI to do this. Currently, you have to manually delete the cache.The location of the cache varies based on the client adapter used.

    JavaHL caches the information in the same location as the command line client -- in the Subversion runtime configuration area.
On Windows this is located in %APPDATA%\Subversion\auth. On Linux and OSX it is located in ~/.subversion/auth.
Just find and delete the file with the cached information.

    SVNKit caches information in the Eclipse keyring. By default this is a file named .keyring that is stored in the root of the Eclipse configuration folder.
Both of these values can be overriden with command line options. To clear the cache, you have to delete the file.Eclipse will create a new empty keyring when you restart

Just Like, in my case I've been using JavaHL, which cashes credential data in the Subversion runtime configuration area. 
On Windows this was in "C:\Users\%User_Name%\AppData\Roaming\Subversion\auth\svn.simple" in one of the files with a long HEX name.

Sunday, 21 April 2013

How to Display your Custom-Portlet information @ Theme Level


To make any changes @ theme-level, you must include that code  in the portal_normal.vm file of your current theme(or the theme you are using in that particular page)
·         Create a new file (naming : portal_normal.vm)  at the following location in your theme –
/mytheme -theme/docroot/_diffs/templates/portal_normal.vm


1st Approach

STEP:1
·         Add the following line of code after the </header> tag (or select your desired location @ theme- level) -

#set($addressDetailsLocalService = $serviceLocator.findService("AddressDirectory-portlet","com.test.service.addressDetailsLocalService"))
#set($count = $addressDetailsLocalService.getaddressDetailsesCount())
<h2> The No. of Entries in Your Address Portlet Are : $count </h2>
where,
Ø  AddressDirectory-portlet – your custom portlet’s id
Ø  Com.test.service.addressDetailsLocalService – path of your local service api(addressDetailsLocalService.java) generated by the service layer
Ø  $count – is a velocity variable ,i have defined to store the no. Of entries added in my entity(addressDetails).

·         Deploy your theme again..and check the respective changes  have been reflected ...
STEP-2:
Now as you can observe ,this change has been reflected for the very first time only (first time after the theme has been redeployed) but  inaffective later on..
To get rid of the following problem –go to your  addAddress() method  in the  requisite .java file  ,now in this method simply add this line of code-
addressDetailsUtil.clearCache(addressObj);
where,
Ø  addressDetails –name of the custom entity(entity which you are using)
Ø  addressObj- is the object of the entity.
-this line of code will clear the database cache
Why Step2: The db cache are useful to avoid unuseful access to DB...But  If the entity is changed by application, cache copy is invalidated, and a new refreshed copy of the entity are extracted by DB. If you update data in you db, the update are not listened, so your application data are not updated.
Alternative: Issue gets resolved if each time after adding an entry to your portlet go to –
Control Panel / server Administration / Resources /Actions
and clear the database cache from here....but this is not an optimal solution as each time you have to clear the cache manually....so ie why i preferred adding the above line of code in  my .java file (AddressDirectory .java).

Otherwise : checkout this way :  

2nd Approach  (Recommended)

Using this method(addressDetailsLocalService.getaddressDetailses(0,-1).size()) ,
you need'nt to clear the DB cache everytime you make an entry..

#set($addressDetailsLocalService = $serviceLocator.findService("AddressDirectory-portlet", "com.test.service.addressDetailsLocalService"))
#set($count = $addressDetailsLocalService.getaddressDetailses(0, -1).size())

<h2> The No. of Entries in Your Address Portlet Are : $count </h2>