Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » confusion over basic need for 'import' in scrapbook(do i need to import even if i dont define my own class?)
confusion over basic need for 'import' in scrapbook [message #1704065] Fri, 07 August 2015 06:47 Go to next message
cool pontiac is currently offline cool pontiacFriend
Messages: 4
Registered: August 2015
Junior Member
brand new to eclipse and trying to follow the 'dexter' videos on youtube....

Q1: when i create a scrapbook and try something simple like
int a:
a= 5;
and then i try to inspect a i get error
a cannot be resolved to a variable

what am i doing wrong? i didnt define any classes so i dont think i need to import a package

question 2: if i import a package into the scrapbook ... can i see this ? how do i know I did it?

thx
Re: confusion over basic need for 'import' in scrapbook [message #1704166 is a reply to message #1704065] Fri, 07 August 2015 19:52 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
Question 1: did you select both lines of code before doing Inspect...? It will evaluate whatever you have selected, so if you only selected the assignment line, it doesn't know about the first line where you declared a.
Question 2: The set of imports for a scrapbook page are configured (and viewed) by right-clicking in the scrapbook and choosing Set Imports... from the popup menu.
Re: confusion over basic need for 'import' in scrapbook [message #1704216 is a reply to message #1704166] Sun, 09 August 2015 03:13 Go to previous messageGo to next message
cool pontiac is currently offline cool pontiacFriend
Messages: 4
Registered: August 2015
Junior Member
thanks Eric!
yep.. i see that i have to select all of the text (mulitple lines) that apply to creating the variable if i want to use the inspection button

is the purpose of inspect .. just to see the value of only 1 variable (ie the last variable typed without a ";" , ie. does inspect have a very limited value when coding/debugging?

for example... if I select this text to try to inspect the values of a and b I get an error because I guess the program fails on the line that just has 'b'?


int a = 5;

int b = 2;
b
a = a * 10;
a
Re: confusion over basic need for 'import' in scrapbook [message #1704251 is a reply to message #1704216] Sun, 09 August 2015 20:36 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Well, yes, because syntactically you've written the same thing as:
b a = a * 10;


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:error retrieving data from database
Next Topic:i cannot turn on html feature in this forum
Goto Forum:
  


Current Time: Fri Apr 26 01:32:59 GMT 2024

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

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

Back to the top