Sunday, December 25, 2011

How to register an eclipse editor by file content

Sometimes you may want to register an eclipse editor by reading file content. As an example if we need to open Maven POM file with specificity packing type with your editor or if you need to use different files without file extension, so we have to write a custom ContentDescriber to handle it. 

We can write custom ContentDescriber by extending or implementing following classes/ interfaces.

ITextContentDescriber
XMLContentDescriber
IContentDescriber
BinarySignatureDescriber
 
So let's write a custom ContentDescriber by extending XMLContentDescriber

package org.my.editor.describer;

import java.io.IOException;
import java.io.InputStream;
import org.eclipse.core.runtime.content.IContentDescription;
import org.eclipse.core.runtime.content.XMLContentDescriber;

public class MyDescriber extends XMLContentDescriber {

 public int describe(InputStream input, IContentDescription description)
   throws IOException {
   /** Implement logics to validate content by reading input stream  
    *  if success, return VALID;   
    */
  return INVALID;
 }
 
} 

let's modify plugin.xml to register custom ContentDescriber
 
<extension
         point="org.eclipse.ui.editors">
 <editor
            class="org.my.editor.MyEditor"
            id="org.my.editor.myeditor"
            name="My Editor">
            <contentTypeBinding
    contentTypeId="org.my.contenttype.my">
   </contentTypeBinding>
      </editor>
   </extension>
   <extension point="org.eclipse.core.contenttype.contentTypes">
  <content-type base-type="org.eclipse.core.runtime.xml"
   id="org.my.contenttype.my"
   name="My File" priority="high">
   <describer
    class="org.my.editor.describer.MyDescriber">
   </describer>
  </content-type>
 </extension> 
   

Sunday, May 1, 2011

Alabama’s Deadliest Tornado

deadly tornado spree across Alabama on April 27th


Photo of Cordova Tornado from future I-22 on Apr. 27, 2011

Tuesday, April 26, 2011

NetBeans IDE 7.0 Final available for download!

NetBeans IDE 7.0 - The Smarter Way to Code!    
NetBeans™ IDE 7.0 introduces language support for coding to the proposed Java SE 7 specification with the JDK 7 developer preview. Developers can now take advantage of the new language features from Project Coin /JSR 334, with editor support for code completion, hints, and in specific cases converting existing Java SE 6 based code to use the new Java SE 7 based syntax.

The release also provides enhanced integration with the Oracle WebLogic server as well as support for Oracle Database and GlassFish 3.1. The Oracle WebLogic server integration enhancements include fast turnaround when redeploying applications; deploy on save; datasource management; server library configuration; the ability to explore deployed applications and resources, and to view server logs and the admin console from within the IDE.

Additional highlights include Maven 3 and HTML5 editing support; a new GridBagLayout designer for improved Swing GUI development; enhancements to the Java editor, and more.
NetBeans IDE 7.0 is available in English, Brazilian Portuguese, Japanese, Russian, and Simplified Chinese.

Download NetBeans IDE 7.0

Release Highlights

JDK 7
  • Project Coin support
  • Editor enhancements: Code completion, hints
WebLogic Server
  • Streamlined and faster deployment to WebLogic
  • New server runtime node displaying deployed applications and resources
Oracle Database
  • Simplified connection wizard
  • Guided installation to JDBC driver
GlassFish
  • GlassFish 3.1 support
  • Domain restart and log viewer for remote GlassFish
Java
  • Maven 3 support
  • JUnit 4.8.2 integration and various JUnit improvements
  • New improved visual customizer for GridBagLayout
Java EE
  • Improved support for CDI, REST services and Java Persistence
  • Improved editing for Expression Language in JSF, including code completion, refactoring and hints
Web Languages
  • HTML5 editing support
  • JSON formatter
PHP
  • Generate PhpDoc
  • Rename refactoring, Safe Delete Refactoring
C/C++
  • Easy import of project from user's existing binary
  • New Project type where user's source files are located on remote system
NetBeans Platform
  • Annotations for generating Action registrations in the layer
  • Performance enhancements & tight integration with Profiler
General
  • Word wrap in Editor
  • Enhanced Profiler integration
Source : nbannounce.netbeans.org

Saturday, April 23, 2011

Amazon cloud glitch knocks out popular websites

Computerworld - Popular websites, including like Quora and Reddit, have been hampered or totally knocked out today because of server problems in Amazon.com's data center that handles the company's Web hosting services.

Amazon began reporting trouble on its Service Health Dashboard about 5 a.m. Eastern today. At 5:16 a.m., the site reported connectivity issues that were affecting its Relational Database Service, which is used to manage a relational database in the cloud, across multiple zones in the eastern U.S.

Amazon also reported problems with its EC2, or Elastic Compute Cloud, a service that provides pay-as-you-go compute capacity in the cloud. The company also reported issues with its EBS, or Elastic Block Storage, which is storage related to the EC2 service.

"A networking event early this morning triggered a large amount of re-mirroring of EBS volumes in US-EAST-1," Amazon reported at 11:54 a.m. Eastern today. "This re-mirroring created a shortage of capacity in one of the US-EAST-1 Availability Zones, which impacted new EBS volume creation as well as the pace with which we could re-mirror and recover affected EBS volumes."

The company also said one of its internal control planes for EBS has become overloaded so it's difficult to create new EBS volumes and EBS-backed instances.

"We are working as quickly as possible to add capacity to that one Availability Zone to speed up the re-mirroring, and working to restore the control plane issue," the company added. "We're starting to see progress on these efforts, but are not there yet. We will continue to provide updates when we have them."
The problem has had some widespread effects, especially for some popular Web 2.0 sites.

A note to users on the Quora website today read, "We're currently having an unexpected outage, and are working to get the site back up as soon as possible. Thanks for your patience."

HootSuite and Foursquare also have been affected, along with Reddit, which posted a note to users saying, "Amazon is currently experiencing a degradation. They are working on it. We are still waiting on them to get to our volumes. Sorry."

Some users are venting their frustrations with Amazon and the cloud on Twitter. "Amazon's Eastern US cluster is still down, and some of our data with it. So much for the reliability of cloud services," tweeted @Thierry_G. And @steve_dine tweeted, "Amazon still down for EBS instances and volumes. Getting ready to fire up our GoGrid backup servers."

Friday, April 15, 2011

Internet Explorer 10: Windows Vista users out of luck

"It might sound impossible, but Microsoft is about to make its Windows Vista operating system even more undesirable.

The Redmond company is confirming that Internet Explorer 10, the next version of its web browser, won’t work on the 4-year-old Windows Vista (or earlier Windows versions) in the same way that IE9 left the older Windows XP (and Windows 2000) behind."

more information : http://www.geekwire.com/2011/internet-explorer-10-windows-vista

Thursday, April 14, 2011

Christine Mirzayan Science & Technology Policy Graduate Fellowship, USA

Study Subject:Science & Technology

Employer: National Academy of Science

Level:Graduate

Scholarship Description:The Christine Mirzayan Science & Technology Policy Graduate Fellowship Program within the Policy and Global Affairs Division of the National Academies is designed to engage its Fellows in the analytical process that informs U.S. science and technology policy. Fellows develop basic skills essential to working or participating in science policy at the federal, state, or local levels.
Graduate students and postdoctoral scholars and those who have completed graduate studies or postdoctoral research in any social/behavioral science, medical/health discipline, physical or biological science, any field of engineering, law/business/public administration, or any relevant interdisciplinary field within the last five years are eligible to apply.

Scholarship Application Deadline:May 1, 2011

Further Scholarship Information and Application

Monday, April 11, 2011

Tornado Cuts A Swath Through West Iowa Town

Source : The Associated Press, April 10, 2011

A large tornado flattened a grain elevator and destroyed homes and buildings on its weekend rampage through the small western Iowa town of Mapleton. Authorities reported no serious injuries.
"It was huge, just huge," said Thomas Mohrhauser, an attorney in the town of about 1,200 people. "It just kept getting bigger and bigger."
Mohrhauser said the tornado appeared to be about a quarter-mile wide when it cut a northwest path through town Saturday evening.
National Weather Service meteorologist Van DeWald confirmed that Mapleton, located about 40 miles southeast of Sioux City, received "quite a bit of damage" from the tornado, which hit about 7:20 p.m. Saturday.
Reports indicated the roof was blown off a high school, power lines were downed and several homes and buildings were destroyed. Authorities said three people were treated for minor injuries at Burgess Health Center in Onawa, about 20 miles from Mapleton.
A Monona County Sheriff's dispatcher said authorities blocked access to Mapleton except to emergency crews because of the heavy damage. The dispatcher, who declined to give her name, wouldn't give details about injuries.
Frank Boksa, a weather service meteorologist in Johnston, said Gov. Terry Branstad issued a disaster proclamation for Monana County, allowing the state to spend money to respond to the storm.
Boksa said another tornado touched down near the Sac County town of Early, but there appeared to be little damage.
Authorities had no immediate calculation of the intensity of Saturday's tornado that struck Mapleton.
KCAU-TV in Sioux City showed footage of gutted buildings, debris scattered across roadways and emergency vehicles with sirens flashing as crews searched the damaged and destroyed buildings.
"We're going door by door to make sure everybody's out," Joe Rodriguez, of Sioux City's Urban Search and Rescue Task Force, told KCAU-TV.
Monana County is in the same region of western Iowa where four Boy Scouts died in a tornado that struck a scouting ranch in June 2008. The National Weather Service said the tornado that hit the 1,800-acre Little Sioux Scout Ranch in the Loess Hills was an EF3 tornado on the 1-to-5 Enhanced Fujita scale of intensity with an estimated wind speed of 145 mph.

Saturday, April 9, 2011

Release schedule for Fedora 15

2011-01-25 Feature Submission Deadline
2011-02-08 Feature Freeze--Planning & Development Ends
2011-02-08 Branch Fedora 15 from Rawhide-- Branch Freeze
2011-02-15 Software String Freeze
2011-02-15 Alpha Change Deadline
2011-03-08 Alpha Release
2011-03-29 Software Translation Deadline
2011-04-05
Beta Change Deadline, Features 100% Complete
2011-04-19 Beta Release
2011-05-09 Final Change Deadline
2011-05-10 Compose 'Final' RC
2011-05-24 Fedora 15 Final Release

Thursday, February 10, 2011

Welcome to my new blog!

Welcome to my new blog. The email account linked to my old blog (http://blog.melan.za.net/) has been shut down and I can't remember my password


Thanks 


Melan Nimesh