Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How do to......(Eclipse configuration)
How do to...... [message #1207637] Sun, 24 November 2013 17:55 Go to next message
Jose Fdz Garcia is currently offline Jose Fdz GarciaFriend
Messages: 1
Registered: November 2013
Junior Member
Hi all!!

I'm new in Eclipse and want to know how to do :

-Reduce code segments to his methods names,automatically when opening a random class

For example:

public boolean consultar(Pelicula pelicula){
			boolean bandera=false;
			try{
				String sql=new String();
				sql="SELECT * FROM peliculas WHERE CODIGO = "+pelicula.getCodigo()+";";
				objBBDD.resultado=objBBDD.sentencia.executeQuery(sql);
				objBBDD.resultado.next();
				pelicula.setCodigo(objBBDD.resultado.getInt("CODIGO"));
				pelicula.setTitulo(objBBDD.resultado.getString("TITULO"));
				pelicula.setDirector(objBBDD.resultado.getInt("COD_DIRECTOR"));
				pelicula.setTematica(objBBDD.resultado.getInt("COD_TEMA"));
				pelicula.setCaratula(objBBDD.resultado.getString("CARATULA"));
				bandera=!bandera;
			}catch (SQLException e) {
				e.printStackTrace();
				JOptionPane.showMessageDialog(null, "BD:ERROR AL CONSULTAR");
			}
			return bandera;
		}


AS

public boolean consultar(Pelicula pelicula){ ..


I use the "PLUS BOTTOM" at left of the code, but every time i close and open the class the methods appears extended.

Thanks for read!!
Re: How do to...... [message #1208718 is a reply to message #1207637] Mon, 25 November 2013 06:28 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 11/24/2013 12:07 PM, Jose Fdz Garcia wrote:
> Hi all!!
>
> I'm new in Eclipse and want to know how to do :
>
> -Reduce code segments to his methods names,automatically when opening
> a random class
>
> For example:
>
>
> public boolean consultar(Pelicula pelicula){
> boolean bandera=false;
> try{
> String sql=new String();
> sql="SELECT * FROM peliculas WHERE CODIGO =
> "+pelicula.getCodigo()+";";
> objBBDD.resultado=objBBDD.sentencia.executeQuery(sql);
> objBBDD.resultado.next();
> pelicula.setCodigo(objBBDD.resultado.getInt("CODIGO"));
> pelicula.setTitulo(objBBDD.resultado.getString("TITULO"));
>
> pelicula.setDirector(objBBDD.resultado.getInt("COD_DIRECTOR"));
>
> pelicula.setTematica(objBBDD.resultado.getInt("COD_TEMA"));
>
> pelicula.setCaratula(objBBDD.resultado.getString("CARATULA"));
> bandera=!bandera;
> }catch (SQLException e) {
> e.printStackTrace();
> JOptionPane.showMessageDialog(null, "BD:ERROR AL
> CONSULTAR");
> }
> return bandera;
> }
>
>
> AS
>
>
> public boolean consultar(Pelicula pelicula){ ..
>
>
> I use the "PLUS BOTTOM" at left of the code, but every time i close and
> open the class the methods appears extended.
>
> Thanks for read!!

Do Window -> Preferences -> Java -> Editor -> Folding and examine the
following link. This should explain all.

http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fpreferences%2Fjava%2Feditor%2Fref-preferences-folding.htm
Previous Topic:iserver usage report
Next Topic:Error code=-1
Goto Forum:
  


Current Time: Fri Apr 26 05:49:34 GMT 2024

Powered by FUDForum. Page generated in 0.07904 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top