Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
Delphi-BCB
IDE
Add Component Template
Background compile
Batch file target
Block Completion
Build Tools
Caliber
Class Completion
Class Explorer
Code Browsing
Code Completion
Code Editor
Code Explorer
Code Parameters
Code Templates
Compiler Message Window
Deployment Manager
Dialogs
Direct
Docking
File Browser
File Handling
Form Designer
Help
History View
IDE Insight
Memory Issues
Menu Designer
Menus
Module Manager
Multi-Monitor Support
Object Inspector
Object TreeView
Open Tools API
Packages
Performance
Printing
Project Explorer(old Object Browser)
Project Management
Refactoring
Repository
Save Desktop
Search
Start Page
Starteam
Startup/Shutdown
Structure Pane
System Resources
ToDoList
Tool Palette
Toolbars/Status Line
Translation Tools
Unit Testing
Version Control
VersionInfo
Views
Visual Form Inheritance
Workgroup(PVCS)
You are not logged in.
Help
Print
Public Report
Report From:
Delphi-BCB/IDE/Class Completion
[ Add a report in this area ]
Report #:
98711
Status:
Open
$IFDEF breaks class navigation / code completion
Project:
Delphi
Build #:
16.0.4256.43595
Version:
16.0
Submitted By:
Sebastian Zierer
Report Type:
Basic functionality failure
Date Reported:
9/9/2011 1:09:06 AM
Severity:
Serious / Highly visible problem
Last Updated:
3/20/2012 2:24:39 AM
Platform:
All platforms
Internal Tracking #:
287544
Resolution:
None
(Resolution Comments)
Resolved in Build:
:
None
Duplicate of:
None
Voting and Rating
Overall Rating:
No Ratings Yet
0.00 out of 5
Total Votes:
None
Description
Class navigation / code completion can be confused by $IFDEF. It should not be a problem to navigate between the implementation and interface part of the TTest class using Ctrl+Shift+Up/Down or invoke class completion using Ctrl+Shift+C.
Ctrl+Shift+Up/Down is ignored
Ctrl+Shift+C raises the error "Could not find source location to add method xy. "END." or INITIALIZATION not found in unit source."
The FMX canvas uses Single where the VCL Canvas uses Integer. This makes this problem a bit more relevant and annoying.
Note: QC #34274 might be related, but code navigation in the current example should work regardless of the currently defined $IFDEFs.
Steps to Reproduce:
1. Add the following unit to a Delphi project
2. Try to navigate between the interface Test and the implemtation Test using Ctrl+Shift+Up/Down
Expect: Navigation works
Act: Nothing happens
unit Unit1;
interface
type
TTest = class
public
procedure Test;
end;
implementation
{ TTest }
procedure TTest.Test;
var
I: Integer;
begin
I := 1 {$IFDEF MSWINDOWS}div{$ELSE}/{$ENDIF} 2;
end;
end.
--------------------------------------
Test case 2:
--------------------------------------
1. Add the following unit to a Delphi project
2. Move Cursor to "procedure xy"
3. Press Ctrl+Shift+C for class completion
---------------------------
Error
---------------------------
Could not find source location to add method xy. "END." or INITIALIZATION not found in unit source.
---------------------------
OK
---------------------------
unit Unit2;
interface
type
TTest = class
public
procedure Test;
procedure xy;
end;
implementation
{ TTest }
procedure TTest.Test;
var
I: Integer;
begin
I := 1 {$IFDEF MSWINDOWS}div{$ELSE}/{$ENDIF} 2;
end;
end.
Workarounds
None
Attachment
None
Comments
None
View Your Reports
Search
Server Response from: ETNACODE01
Developer Tools
Blackfish SQL
C++Builder
Delphi
FireMonkey
Prism
InterBase
JBuilder
J Optimizer
HTML5 Builder
3rdRail & TurboRuby
Database Tools
Change Manager
DBArtisan
DB Optimizer
ER/Studio
Performance Center
Rapid SQL
Technical Articles
Tutorials
White Papers
Press Releases
Newsletters
Add Content (GetPublished)
Audio
Audio & Video
Video
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Tags
Technology Partners
Downloads
Free Trials
Registered User Downloads
Beta Programs
Add Content (GetPublished)
Articles
Blogs
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Member Services
About
Connect with Us